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 ########################################################
# 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:
# Required for next-auth. Should be the same as WEBAPP_URL
@@ -201,9 +201,13 @@ services:
volumes:
- postgres:/var/lib/postgresql/data
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
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
# Remove this service if you want to use an external Redis/Valkey instance
@@ -215,13 +219,21 @@ services:
- redis:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 5s
timeout: 3s
retries: 30
start_period: 10s
formbricks:
restart: always
image: ghcr.io/formbricks/formbricks:latest
depends_on:
- postgres
- redis
postgres:
condition: service_healthy
redis:
condition: service_healthy
ports:
- 3000:3000
volumes: