fix: adjust
continuous-integration/drone/push Build is passing Details

This commit is contained in:
BryantHe 2024-02-05 14:17:52 +08:00
parent dd65676fb1
commit 2093bbf9f6
2 changed files with 14 additions and 6 deletions

View File

@ -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 分钟后过期所有已有链接
}) })

View File

@ -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