fix: qw6
continuous-integration/drone/tag Build is passing Details

develop v0.25
Unshift 2025-09-26 10:32:39 +08:00
parent 325f1fb88e
commit 5e5a08340f
2 changed files with 5 additions and 1 deletions

View File

@ -48,6 +48,10 @@ steps:
script:
- echo ====开始部署=======
- docker pull registry.cn-shanghai.aliyuncs.com/gong92-socl/debian-nginx-php114-74:${DRONE_TAG}
- docker stop $(docker ps | grep hyperf | awk '{print $1}')
- docker rm $(docker ps | grep hyperf | awk '{print $1}')
- docker rmi $(docker images | grep gong921123/hyperf | awk '{print $3}')
- docker rmi $(docker images | grep "<none>" | awk '{print $3}')
- docker run -itd --name hyperf -p 8001:8001 -v /var/projects:/var/www -v /usr/local/docker/vloumn_nginx:/etc/nginx/conf.d -v /etc/hosts:/etc/hosts --privileged=true registry.cn-shanghai.aliyuncs.com/gong92-socl/debian-nginx-php114-74:${DRONE_TAG}
- echo ====部署成功=======

View File

@ -9,7 +9,7 @@ COPY . /var/www
# CMD不同于RUNCMD用于指定在容器启动时所要执行的命令而RUN用于指定镜像构建时所要执行的命令
# CMD只运行出现一次 多次出现只会执行最后一个
# 启动 hyperf 框架 并且 启动Nginx 服务器
CMD ["php", "bin/hyperf.php", "start"]
#CMD ["php", "bin/hyperf.php", "start"]
#CMD ["nginx"]
#CMD php bin/hyperf.php start && nginx -g 'daemon off;'
#CMD php bin/hyperf.php start && nginx