summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriza <59828082+izadoesdev@users.noreply.github.com>2025-06-23 13:01:39 +0300
committerGitHub <noreply@github.com>2025-06-23 13:01:39 +0300
commit7c5057ebd7de08ab39e9305c889f009fc23b9a19 (patch)
tree5bd91b15e50d4ae7d7cc95acf0ee7451a5082a86
parentd92aed2dac5ea3ff015ce974b9519e03e2e9823c (diff)
parent0555d2893d6f6ac3da5cca03d6058fa386359b1e (diff)
downloadopencut-7c5057ebd7de08ab39e9305c889f009fc23b9a19.tar.gz
Merge pull request #5 from ShadowArcanist/main
feat: Add healthchecks to docker compose
-rw-r--r--docker-compose.yaml23
1 files changed, 22 insertions, 1 deletions
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 0c3ef30c..c1c61a47 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", "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: