feat(docker): add healthcheck for api, worker, and worker_beat services (#34345)

Signed-off-by: majiayu000 <1835304752@qq.com>
This commit is contained in:
lif
2026-04-01 09:31:42 +08:00
committed by GitHub
parent 57f358a96b
commit d2baacdd4b
2 changed files with 36 additions and 0 deletions

View File

@@ -56,6 +56,12 @@ services:
volumes: volumes:
# Mount the storage directory to the container, for storing user files. # Mount the storage directory to the container, for storing user files.
- ./volumes/app/storage:/app/api/storage - ./volumes/app/storage:/app/api/storage
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
networks: networks:
- ssrf_proxy_network - ssrf_proxy_network
- default - default
@@ -95,6 +101,12 @@ services:
volumes: volumes:
# Mount the storage directory to the container, for storing user files. # Mount the storage directory to the container, for storing user files.
- ./volumes/app/storage:/app/api/storage - ./volumes/app/storage:/app/api/storage
healthcheck:
test: ["CMD-SHELL", "celery -A celery_entrypoint.celery inspect ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks: networks:
- ssrf_proxy_network - ssrf_proxy_network
- default - default
@@ -126,6 +138,12 @@ services:
required: false required: false
redis: redis:
condition: service_started condition: service_started
healthcheck:
test: ["CMD-SHELL", "celery -A app.celery inspect ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks: networks:
- ssrf_proxy_network - ssrf_proxy_network
- default - default

View File

@@ -765,6 +765,12 @@ services:
volumes: volumes:
# Mount the storage directory to the container, for storing user files. # Mount the storage directory to the container, for storing user files.
- ./volumes/app/storage:/app/api/storage - ./volumes/app/storage:/app/api/storage
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
networks: networks:
- ssrf_proxy_network - ssrf_proxy_network
- default - default
@@ -804,6 +810,12 @@ services:
volumes: volumes:
# Mount the storage directory to the container, for storing user files. # Mount the storage directory to the container, for storing user files.
- ./volumes/app/storage:/app/api/storage - ./volumes/app/storage:/app/api/storage
healthcheck:
test: ["CMD-SHELL", "celery -A celery_entrypoint.celery inspect ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks: networks:
- ssrf_proxy_network - ssrf_proxy_network
- default - default
@@ -835,6 +847,12 @@ services:
required: false required: false
redis: redis:
condition: service_started condition: service_started
healthcheck:
test: ["CMD-SHELL", "celery -A app.celery inspect ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks: networks:
- ssrf_proxy_network - ssrf_proxy_network
- default - default