services: app: build: . ports: - "4321:4321" environment: - NODE_ENV=production - HOST=0.0.0.0 - PORT=4321 - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/randify depends_on: postgres: condition: service_healthy healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:4321/api/health"] interval: 10s timeout: 5s retries: 5 start_period: 10s restart: unless-stopped postgres: image: postgres:16-alpine ports: - "5432:5432" environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=randify volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d randify"] interval: 5s timeout: 5s retries: 5 start_period: 5s restart: unless-stopped volumes: postgres_data: