65 lines
1.5 KiB
YAML
65 lines
1.5 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
pzx-web-api-1:
|
|
image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest
|
|
env_file:
|
|
- .apiflaskenv
|
|
- .apiflask.env
|
|
ports:
|
|
- target: 5000
|
|
published: 7100
|
|
mode: host
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 2
|
|
resources:
|
|
reservations:
|
|
cpus: '0.02'
|
|
memory: 50M
|
|
limits:
|
|
cpus: '0.10'
|
|
memory: 300M
|
|
update_config:
|
|
parallelism: 1
|
|
failure_action: rollback
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 5s
|
|
max_attempts: 1
|
|
window: 120s
|
|
placement:
|
|
constraints:
|
|
- 'node.role == worker'
|
|
networks:
|
|
- ddk-network
|
|
# 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:
|
|
# - ddk-network
|
|
|
|
networks:
|
|
ddk-network:
|
|
driver: overlay
|
|
attachable: true |