更新
This commit is contained in:
@@ -84,9 +84,7 @@ services:
|
|||||||
max-size: "10m"
|
max-size: "10m"
|
||||||
max-file: "3"
|
max-file: "3"
|
||||||
|
|
||||||
# Celery Worker(后台任务处理)
|
# Celery Worker(后台任务处理,禁用健康检查避免与 api 共用镜像的 8000 端口检查冲突)
|
||||||
# 注意:与 api 共用镜像,但 Dockerfile 的 HEALTHCHECK 是探测 8000 端口的,worker 不提供 HTTP,
|
|
||||||
# 因此必须在此覆盖健康检查,否则容器会一直被判定为 unhealthy
|
|
||||||
celery-worker:
|
celery-worker:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
@@ -107,12 +105,6 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
api:
|
api:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "celery", "-A", "tasks.celery_app", "inspect", "ping"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
start_period: 40s
|
|
||||||
networks:
|
networks:
|
||||||
- life-echo-network
|
- life-echo-network
|
||||||
logging:
|
logging:
|
||||||
|
|||||||
Reference in New Issue
Block a user