version: "3" services: web: build: . ports: - "3000:3000" restart: always environment: DATABASE_URL: postgresql://discourse_connect:discourse_connect@db:5432/discourse_connect depends_on: db: condition: service_healthy healthcheck: test: ["CMD-SHELL", "curl http://localhost:3000/api/health"] interval: 5s timeout: 5s retries: 5 db: image: postgres:15-alpine environment: POSTGRES_DB: discourse_connect POSTGRES_USER: discourse_connect POSTGRES_PASSWORD: discourse_connect volumes: - next-db-data:/var/lib/postgresql/data restart: always healthcheck: test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] interval: 5s timeout: 5s retries: 5 volumes: next-db-data: