services: db: image: postgres:16-alpine container_name: whatisup-db environment: POSTGRES_USER: whatisup POSTGRES_PASSWORD: whatisup POSTGRES_DB: whatisup ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U whatisup"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped api: build: . container_name: whatisup-api ports: - "8080:8080" env_file: .env environment: DATABASE_URL: postgresql+asyncpg://whatisup:whatisup@db:5432/whatisup PUBLIC_APP_URL: ${PUBLIC_APP_URL:-http://localhost:8080} depends_on: db: condition: service_healthy restart: unless-stopped volumes: pgdata: