# Local development overlay. # # The base docker-compose.yml intentionally ships no Postgres: staging and # production get theirs from Coolify, and the staging overlay defines its own. # That left `docker compose up` without a database, so a fresh clone could not # actually start. This overlay adds the one missing piece. # # Deliberately a SEPARATE file, not a service in docker-compose.yml: # docker-compose.staging.yml already defines `postgres`, and composing base + # staging (the command documented in that file's header) would deep-merge the # two definitions — appending volume and port entries rather than replacing # them. Keeping dev separate means base+staging stays byte-for-byte what it is # today. Compose does not auto-load this file (only *.override.yml is implicit), # so `docker compose config` in CI keeps validating the base stack alone. # # Usage: pnpm dev:services (see README "Lokales Setup") services: postgres: # pgvector, not plain postgres: migration 04_enable_pgvector runs # `CREATE EXTENSION vector`, which the stock image cannot satisfy. # pg_trgm (used by the files/tasks migrations) ships with contrib. image: pgvector/pgvector:pg16@sha256:1d533553fefe4f12e5d80c7b80622ba0c382abb5758856f52983d8789179f0fb environment: POSTGRES_DB: ${POSTGRES_DB:-hivegrid} POSTGRES_USER: ${POSTGRES_USER:-hivegrid} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-hivegrid} ports: # Loopback-only, like every other published dev port. The credentials are # the well-known defaults above, so this must never reach the LAN. # 5432 direct, no PgBouncer: the pooler in the base compose mounts # infra/pgbouncer/userlist.txt, which is not in the repo (only a # .template), so it cannot come up locally — and Prisma migrate needs an # unpooled connection anyway. - "127.0.0.1:5432:5432" volumes: - hivegrid-dev-postgres:/var/lib/postgresql/data - ./scripts/dev/init-local-database.sql:/docker-entrypoint-initdb.d/10-hivegrid-local-marker.sql:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-hivegrid} -d ${POSTGRES_DB:-hivegrid}"] interval: 5s timeout: 3s retries: 20 start_period: 10s restart: unless-stopped volumes: hivegrid-dev-postgres: