diff options
| author | ShadowArcanist <projectshadowmoon@gmail.com> | 2025-06-23 14:42:00 +0530 |
|---|---|---|
| committer | ShadowArcanist <projectshadowmoon@gmail.com> | 2025-06-23 14:42:00 +0530 |
| commit | cbe152e83d4a96180211ab6e4edfaa76e608e3cf (patch) | |
| tree | ea15da178f52c1ec396da911a96bd1a4e1524b29 /docker-compose.yaml | |
| parent | d92aed2dac5ea3ff015ce974b9519e03e2e9823c (diff) | |
| download | opencut-cbe152e83d4a96180211ab6e4edfaa76e608e3cf.tar.gz | |
feat: add healthchecks to docker compose
Diffstat (limited to 'docker-compose.yaml')
| -rw-r--r-- | docker-compose.yaml | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/docker-compose.yaml b/docker-compose.yaml index 0c3ef30c..bddb0b2b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -10,17 +10,38 @@ services: - postgres_data:/var/lib/postgresql/data ports: - "5432:5432" + healthcheck: + test: ["CMD-SHELL", "pg_isready -U opencut"] + interval: 30s + timeout: 10s + retries: 5 + start_period: 10s + redis: image: redis ports: - "6379:6379" + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 30s + timeout: 10s + retries: 5 + start_period: 10s + serverless-redis-http: + image: hiett/serverless-redis-http:latest ports: - "8079:80" - image: hiett/serverless-redis-http:latest environment: SRH_MODE: env SRH_TOKEN: example_token SRH_CONNECTION_STRING: "redis://redis:6379" + healthcheck: + test: ["CMD-SHELL", "wget --spider -q http://127.0.0.1:80 || exit 1"] + interval: 30s + timeout: 10s + retries: 5 + start_period: 10s + volumes: postgres_data: |
