Compare commits

..

16 Commits
v1 ... develop

Author SHA1 Message Date
Unshift aa41b9c2de fix: am1 2025-09-28 09:43:15 +08:00
Unshift 00b913c0c0 fix: aa9
continuous-integration/drone/tag Build is passing Details
2025-09-26 17:10:21 +08:00
Unshift 5d67cd42ed fix: aa8
continuous-integration/drone/tag Build is failing Details
2025-09-26 17:06:12 +08:00
Unshift ce231f8739 fix: aa7
continuous-integration/drone/tag Build is passing Details
2025-09-26 17:00:49 +08:00
Unshift 4e995f48b9 fix: aa6
continuous-integration/drone/tag Build is passing Details
2025-09-26 16:47:59 +08:00
Unshift 978ede45b4 fix: aa5
continuous-integration/drone/tag Build is passing Details
2025-09-26 16:24:58 +08:00
Unshift e3383498b6 fix: aa4
continuous-integration/drone/tag Build is passing Details
2025-09-26 16:19:29 +08:00
Unshift 596b49f844 fix: aa3
continuous-integration/drone/tag Build is passing Details
2025-09-26 16:06:53 +08:00
Unshift a032ce71f8 fix: aa3
continuous-integration/drone/tag Build is passing Details
2025-09-26 15:56:32 +08:00
Unshift a08cb6bd7c fix: aa2
continuous-integration/drone/tag Build is passing Details
2025-09-26 15:48:54 +08:00
Unshift 2f05f7be08 fix: aa1
continuous-integration/drone/tag Build is passing Details
2025-09-26 15:37:47 +08:00
Unshift c5802b2204 fix: aa
continuous-integration/drone/tag Build is passing Details
2025-09-26 15:25:34 +08:00
Unshift 8a3cc2dd43 fix: sd10
continuous-integration/drone/tag Build is passing Details
2025-09-26 15:14:29 +08:00
Unshift 9740f54ea7 fix: sd9
continuous-integration/drone/tag Build is passing Details
2025-09-26 15:07:19 +08:00
Unshift dd7c92ae1c fix: sd8
continuous-integration/drone/tag Build is passing Details
2025-09-26 14:53:27 +08:00
Unshift 6334c2c29a fix: sd7
continuous-integration/drone/tag Build is passing Details
2025-09-26 14:37:04 +08:00
4 changed files with 68 additions and 12 deletions

57
.drone-new.yml Normal file
View File

@ -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

View File

@ -17,7 +17,7 @@ steps:
image: plugins/docker image: plugins/docker
pull: if-not-exists pull: if-not-exists
settings: settings:
repo: gong921123/hyperfa repo: gong921123/hyperfa # 这个地址明确了镜像最终要被推送并存储到的阿里云容器镜像仓库的具体位置 和下面的tag 构建完整的路径
registry: docker.io registry: docker.io
insecure: true insecure: true
username: username:
@ -53,7 +53,7 @@ steps:
trigger: trigger:
# docker run -itd --name hyperf -p 8001:8001 registry.cn-shanghai.aliyuncs.com/gong92-socl/debian-nginx-php114-74:v2
# branch: # branch:
# - develop # - develop
event: event:

View File

@ -17,7 +17,7 @@ steps:
image: plugins/docker image: plugins/docker
pull: if-not-exists pull: if-not-exists
settings: settings:
repo: registry.cn-shanghai.aliyuncs.com/gong92-socl/debian-nginx-php114-74 repo: registry.cn-shanghai.aliyuncs.com/gong92-socl/debian-nginx-php114-74-pro
registry: registry.cn-shanghai.aliyuncs.com registry: registry.cn-shanghai.aliyuncs.com
insecure: true insecure: true
username: username:
@ -42,14 +42,13 @@ steps:
port: 22 port: 22
script: script:
- echo ====开始部署======= - 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}')
# - if [ $(docker ps -aq | grep debian-nginx-php114-7 | wc -l) -gt 0 ]; then docker stop $(docker ps | grep debian-nginx-php114-7 | awk '{print $1}'); docker rm $(docker ps | grep debian-nginx-php114-7 | awk '{print $1}'); fi - docker rm $(docker ps -a | grep hyperf | awk '{print $1}')
# - if [ $(docker images | grep debian-nginx-php114-7 | wc -l) -gt 0 ]; then docker rmi $(docker images | grep debian-nginx-php114-7 | awk '{print $3}'); fi - docker rmi $(docker images | grep gong92-socl/debian-nginx-php114-74-pro | awk '{print $3}')
# - if [ $(docker images | grep "<none>" | wc -l) -gt 0 ]; then docker rmi $(docker images | grep "<none>" | awk '{print $3}'); fi - docker pull registry.cn-shanghai.aliyuncs.com/gong92-socl/debian-nginx-php114-74-pro:${DRONE_TAG}
# - e:${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 ====部署成功======= - echo ====部署成功=======
trigger: trigger:
# branch: # branch:
# - develop # - develop

View File

@ -1,10 +1,10 @@
FROM registry.cn-shanghai.aliyuncs.com/gong92-socl/debian-nginx-php114-74 FROM registry.cn-shanghai.aliyuncs.com/gong92-socl/hyperf3-php81-alpine-sw:v1
#FROM gong921123/debian-nginx-php114-74:latest #FROM gong921123/debian-nginx-php114-74:latest
# 复制当前目录的所有 到上面容器的 var/www中去变成一个新的镜像 # 复制当前目录的所有 到上面容器的 var/www中去变成一个新的镜像
# 要想复制其他文件 就必须把dockerfile和其他文件放一起 # 要想复制其他文件 就必须把dockerfile和其他文件放一起
# 这里复制了这个项目的所有 # 这里复制了这个项目的所有
RUN ls -a RUN pwd && ls -a
COPY . /var/www COPY . /code
RUN ls -al /var/www RUN ls -al /var/www