From aa41b9c2de0a5446d74c44ee058552429334acee Mon Sep 17 00:00:00 2001 From: Unshift Date: Sun, 28 Sep 2025 09:43:15 +0800 Subject: [PATCH] fix: am1 --- .drone-new.yml | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .drone-new.yml diff --git a/.drone-new.yml b/.drone-new.yml new file mode 100644 index 0000000..e7b082b --- /dev/null +++ b/.drone-new.yml @@ -0,0 +1,57 @@ +kind: pipeline +type: docker +name: test + +steps: + - name: build + image: gong921123/debian-nginx-php114-74:latest + pull: if-not-exists + commands: + - composer -v + - ls -a + - composer install -v + + - name: deploy-push-images + depends_on: + - build + image: plugins/docker + pull: if-not-exists + settings: + repo: registry.cn-shanghai.aliyuncs.com/gong92-socl/debian-nginx-php114-74-pro # 和dockerfile 分开 + registry: registry.cn-shanghai.aliyuncs.com + insecure: true + username: + from_secret: aliyun_acr_username + password: + from_secret: aliyun_acr_password + dockerfile: docker/Dockerfile + tags: ${DRONE_TAG} + + - name: deploy-pull-project + depends_on: + - deploy-push-images + image: appleboy/drone-ssh + pull: if-not-exists + settings: + host: 106.15.233.223 + user: + from_secret: ssh_username + password: + from_secret: ssh_password + command_timeout: 5m + port: 22 + script: + - echo ====开始部署======= + - docker stop $(docker ps | grep hyperf | awk '{print $1}') + - docker rm $(docker ps -a | grep hyperf | awk '{print $1}') + - docker rmi $(docker images | grep gong92-socl/debian-nginx-php114-74-pro | awk '{print $3}') + - docker pull registry.cn-shanghai.aliyuncs.com/gong92-socl/debian-nginx-php114-74-pro:${DRONE_TAG} + - 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-pro:${DRONE_TAG} + - echo ====部署成功======= + +trigger: + # branch: + # - develop + event: + - tag +# - push