refactor: move to docker swarm
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-12-09 17:35:13 +08:00
parent f3c980f8f7
commit 0daad7a229
9 changed files with 72 additions and 100 deletions

32
docker-compose-run.yml Normal file
View File

@@ -0,0 +1,32 @@
version: "3.8"
services:
pzx-web-api:
image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest
env_file:
- .apiflaskenv
- .apiflask.env
ports:
- target: 5000
published: 7000
mode: ingress
deploy:
mode: replicated
replicas: 2
update_config:
parallelism: 1
failure_action: rollback
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
placement:
constraints:
- 'node.role == worker'
networks:
- pzx-web-api-network
networks:
pzx-web-api-network:
driver: overlay