fix: adjust
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
dd65676fb1
commit
2093bbf9f6
|
@ -32,7 +32,7 @@ def load_rpc_client(apiflask_app):
|
||||||
rpc.init_app(apiflask_app, extra_config={
|
rpc.init_app(apiflask_app, extra_config={
|
||||||
'INITIAL_CONNECTIONS': 2,
|
'INITIAL_CONNECTIONS': 2,
|
||||||
'MAX_CONNECTIONS': 10,
|
'MAX_CONNECTIONS': 10,
|
||||||
'POOL_RECYCLE': 360 # 6 分钟后过期所有已有链接
|
'POOL_RECYCLE': 1800 # 30 分钟后过期所有已有链接
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,19 +13,26 @@ services:
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
replicas: 2
|
replicas: 2
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
cpus: '0.02'
|
||||||
|
memory: 50M
|
||||||
|
limits:
|
||||||
|
cpus: '0.10'
|
||||||
|
memory: 300M
|
||||||
update_config:
|
update_config:
|
||||||
parallelism: 1
|
parallelism: 1
|
||||||
failure_action: rollback
|
failure_action: rollback
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
delay: 5s
|
delay: 5s
|
||||||
max_attempts: 3
|
max_attempts: 1
|
||||||
window: 120s
|
window: 120s
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
- 'node.role == worker'
|
- 'node.role == worker'
|
||||||
networks:
|
networks:
|
||||||
- pzx-web-api-network
|
- ddk-network
|
||||||
# pzx-web-api-2:
|
# pzx-web-api-2:
|
||||||
# image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest
|
# image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest
|
||||||
# env_file:
|
# env_file:
|
||||||
|
@ -50,8 +57,9 @@ services:
|
||||||
# constraints:
|
# constraints:
|
||||||
# - 'node.role == worker'
|
# - 'node.role == worker'
|
||||||
# networks:
|
# networks:
|
||||||
# - pzx-web-api-network
|
# - ddk-network
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
pzx-web-api-network:
|
ddk-network:
|
||||||
driver: overlay
|
driver: overlay
|
||||||
|
attachable: true
|
Loading…
Reference in New Issue