fix: change to host mode
continuous-integration/drone/push Build is passing Details

This commit is contained in:
BryantHe 2023-12-14 16:32:45 +08:00
parent 0daad7a229
commit aad23cf892
1 changed files with 27 additions and 2 deletions

View File

@ -1,7 +1,7 @@
version: "3.8" version: "3.8"
services: services:
pzx-web-api: pzx-web-api-1:
image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest
env_file: env_file:
- .apiflaskenv - .apiflaskenv
@ -9,7 +9,32 @@ services:
ports: ports:
- target: 5000 - target: 5000
published: 7000 published: 7000
mode: ingress mode: host
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
pzx-web-api-2:
image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest
env_file:
- .apiflaskenv
- .apiflask.env
ports:
- target: 5000
published: 7010
mode: host
deploy: deploy:
mode: replicated mode: replicated
replicas: 2 replicas: 2