# Top-level project name pinned per global Docker policy — without this, the # compose file (when run from /opt/programme-pulse via deploy.sh) would default # to project name "programme-pulse" anyway, but pinning it is explicit and # survives if the file ever moves under deploy/. name: programme-pulse services: app: build: . restart: unless-stopped ports: # Bind only to loopback — Apache fronts the container. - "127.0.0.1:${PROGRAMME_PULSE_PORT:-5051}:5051" environment: - PORT=5051 - DATABASE_URL=postgresql+psycopg://${POSTGRES_USER:-pulse}:${POSTGRES_PASSWORD:-pulse}@db:5432/${POSTGRES_DB:-pulse} env_file: - .env volumes: - ./reports:/app/reports - ./docs/Programme Pulse transcripts:/app/docs/Programme Pulse transcripts:ro - ./logs:/app/logs depends_on: db: condition: service_healthy db: image: postgres:16-alpine restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER:-pulse} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-pulse} POSTGRES_DB: ${POSTGRES_DB:-pulse} volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-pulse} -d ${POSTGRES_DB:-pulse}"] interval: 5s timeout: 3s retries: 12 volumes: pgdata: