From cbe152e83d4a96180211ab6e4edfaa76e608e3cf Mon Sep 17 00:00:00 2001 From: ShadowArcanist Date: Mon, 23 Jun 2025 14:42:00 +0530 Subject: [PATCH 1/2] feat: add healthchecks to docker compose --- docker-compose.yaml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 0c3ef30..bddb0b2 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: From 0555d2893d6f6ac3da5cca03d6058fa386359b1e Mon Sep 17 00:00:00 2001 From: iza <59828082+izadoesdev@users.noreply.github.com> Date: Mon, 23 Jun 2025 13:01:08 +0300 Subject: [PATCH 2/2] Update docker-compose.yaml --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index bddb0b2..c1c61a4 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -11,7 +11,7 @@ services: ports: - "5432:5432" healthcheck: - test: ["CMD-SHELL", "pg_isready -U opencut"] + test: ["CMD", "pg_isready -U opencut"] interval: 30s timeout: 10s retries: 5