services: app: build: . ports: - "8080:8080" environment: - PORT=8080 - DATABASE_URL=postgres://postgres:password@db:5432/gamedb?sslmode=disable depends_on: db: condition: service_healthy restart: on-failure db: image: postgres:16-alpine restart: always environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=password - POSTGRES_DB=gamedb ports: - "5432:5432" volumes: - db-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d gamedb"] interval: 5s timeout: 5s retries: 10 volumes: db-data: