# Postgres + the sync server. `docker compose up -d` is the whole deploy: # # POSTGRES_PASSWORD=$(openssl rand -hex 16) docker compose up -d # # Then point the app at http://:8080. The data lives in the named volume, # so `docker compose down` keeps it and `down -v` wipes it. services: db: image: postgres:18-alpine environment: POSTGRES_DB: prompt_sync POSTGRES_USER: prompt POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD} volumes: - prompt-db:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U prompt -d prompt_sync"] interval: 5s timeout: 5s retries: 10 restart: unless-stopped server: build: . environment: PROMPT_SYNC_ADDR: ":8080" PROMPT_SYNC_DATABASE_URL: postgres://prompt:${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD}@db:5432/prompt_sync?sslmode=disable ports: - "8080:8080" depends_on: db: condition: service_healthy restart: unless-stopped volumes: prompt-db: