Compare commits

...

2 Commits

Author SHA1 Message Date
Sadiq Mohammed
da52ca0385 chore(docker): add start_period to postgres and redis healthchecks 2026-01-23 13:48:50 +00:00
Sadiq Sayed (sayeds4)
aa0f916a8f docker compose: add healthchecks and wait for postgres and redis readiness 2026-01-15 14:48:34 +00:00

View File

@@ -3,7 +3,7 @@ x-environment: &environment
######################################################## REQUIRED ######################################################## ######################################################## REQUIRED ########################################################
# The url of your Formbricks instance used in the admin panel # The url of your Formbricks instance used in the admin panel
# Set this to your public-facing URL, e.g., https://example.com # Set this to your public-facing URL, e.g., example http://localhost:3000 or https://example.com
WEBAPP_URL: WEBAPP_URL:
# Required for next-auth. Should be the same as WEBAPP_URL # Required for next-auth. Should be the same as WEBAPP_URL
@@ -201,9 +201,13 @@ services:
volumes: volumes:
- postgres:/var/lib/postgresql/data - postgres:/var/lib/postgresql/data
environment: environment:
# Postgres DB Super User Password
# Replace the below with your own secure password & Make sure the password matches the password field in DATABASE_URL above
- POSTGRES_PASSWORD=postgres - POSTGRES_PASSWORD=postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres || exit 1"]
interval: 5s
timeout: 3s
retries: 30
start_period: 30s
# Redis/Valkey service for caching, rate limiting, and audit logging # Redis/Valkey service for caching, rate limiting, and audit logging
# Remove this service if you want to use an external Redis/Valkey instance # Remove this service if you want to use an external Redis/Valkey instance
@@ -215,13 +219,21 @@ services:
- redis:/data - redis:/data
ports: ports:
- "6379:6379" - "6379:6379"
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 5s
timeout: 3s
retries: 30
start_period: 10s
formbricks: formbricks:
restart: always restart: always
image: ghcr.io/formbricks/formbricks:latest image: ghcr.io/formbricks/formbricks:latest
depends_on: depends_on:
- postgres postgres:
- redis condition: service_healthy
redis:
condition: service_healthy
ports: ports:
- 3000:3000 - 3000:3000
volumes: volumes: