aec3dd68fe
Production servers pull the pre-built image from ghcr.io — having build: . caused docker compose up to fail when no Dockerfile was present. Moved build: . to docker-compose.override.yml (gitignored) which Docker Compose automatically merges locally for dev builds. Production deployments only need docker-compose.yml and .env. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
639 B
YAML
28 lines
639 B
YAML
services:
|
|
app:
|
|
image: ghcr.io/djsplice07/squares_game:latest
|
|
network_mode: host
|
|
env_file: .env
|
|
environment:
|
|
- DATABASE_URL=postgresql://superbowl:superbowl@127.0.0.1:5432/superbowl?schema=public
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
network_mode: host
|
|
env_file: .env
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U superbowl"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pgdata:
|