Root cause of the 502: the host's disk filled up (down to ~511MB free), which appears to have restarted the Docker daemon. Every other service on this shared host came back up automatically (they all have restart policies); guideCity's three containers didn't and stayed down. Freed ~3.2GB via `docker builder prune` + `docker image prune` (safe: build cache and dangling images only, no running containers touched) and brought the stack back up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
43 lines
1,014 B
YAML
43 lines
1,014 B
YAML
services:
|
|
db:
|
|
image: postgis/postgis:16-3.4
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- guidecity_pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
api:
|
|
build: ./backend
|
|
restart: unless-stopped
|
|
environment:
|
|
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
|
|
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./backend:/app
|
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
|
|
|
adminer:
|
|
image: adminer
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
- db
|
|
|
|
volumes:
|
|
guidecity_pgdata:
|