pzx-web-api/docker-compose-run.yml

65 lines
1.5 KiB
YAML
Raw Normal View History

2023-12-09 17:35:13 +08:00
version: "3.8"
services:
2023-12-14 16:32:45 +08:00
pzx-web-api-1:
2023-12-09 17:35:13 +08:00
image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest
env_file:
- .apiflaskenv
- .apiflask.env
ports:
- target: 5000
2024-01-15 17:54:59 +08:00
published: 7100
2023-12-14 16:32:45 +08:00
mode: host
deploy:
mode: replicated
2025-01-11 15:50:32 +08:00
replicas: 1
2024-02-05 14:17:52 +08:00
resources:
reservations:
cpus: '0.02'
memory: 50M
limits:
cpus: '0.10'
memory: 300M
2023-12-14 16:32:45 +08:00
update_config:
parallelism: 1
failure_action: rollback
restart_policy:
condition: on-failure
delay: 5s
2024-02-05 14:17:52 +08:00
max_attempts: 1
2023-12-14 16:32:45 +08:00
window: 120s
2025-01-11 16:09:03 +08:00
placement:
constraints:
- 'node.role == worker'
2023-12-09 17:35:13 +08:00
networks:
2024-02-05 14:17:52 +08:00
- ddk-network
2024-01-15 18:00:53 +08:00
# pzx-web-api-2:
# image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest
# env_file:
# - .apiflaskenv
# - .apiflask.env
# ports:
# - target: 5000
# published: 7110
# mode: host
# deploy:
# mode: replicated
# replicas: 1
# 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:
2024-02-05 14:17:52 +08:00
# - ddk-network
2023-12-09 17:35:13 +08:00
networks:
2024-02-05 14:17:52 +08:00
ddk-network:
driver: overlay
attachable: true