ci(drone): Add Docker registry mirrors for improved image pulling
All checks were successful
continuous-integration/drone/push Build is passing

- Added multiple Docker registry mirrors to improve image download performance
- Configured Docker daemon with registry mirror configuration
- Updated container name from 'nodejs-app' to 'automated-api'
- Maintained existing volume and environment configurations
This commit is contained in:
lixin 2025-01-25 13:30:18 +08:00
parent 69c7db4b5e
commit d4265b2855

View File

@ -41,18 +41,29 @@ steps:
- name: deploy
image: docker:dind
commands:
- docker stop nodejs-app || true
- docker rm nodejs-app || true
- mkdir -p /etc/docker
- |
echo '{
"registry-mirrors": [
"https://docker.1panelproxy.com",
"https://docker.1panel.live",
"https://ustc-edu-cn.mirror.aliyuncs.com",
"https://ccr.ccs.tencentyun.com",
"https://docker.m.daocloud.io"
]
}' > /etc/docker/daemon.json
- docker stop automated-api || true
- docker rm automated-api || true
- >
docker run -d
--name nodejs-app
--name automated-api
--restart always
-p 8001:8001
-v /usr/local/blackend/node_modules:/app/node_modules
-v /usr/local/blackend/pnpm_cache:/root/.local/share/pnpm/store
-e NODE_ENV=production
-e PORT=8001
your-registry/nodejs-app:latest
automated-api:latest
volumes:
- name: docker_sock
path: /var/run/docker.sock