45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
# Postgres metadata database for the local LawSynth stack.
|
|
#
|
|
# Holds the metadata model (projects, datasets, runs, candidates, worlds, job
|
|
# leases, outbox, audit) described in the production data model. Large
|
|
# numerical payloads never live here — they are content-addressed in object
|
|
# storage and referenced by hash.
|
|
#
|
|
# Included by compose.yaml. Values default to local-only credentials; override
|
|
# them in .env. Never reuse these defaults outside a trusted developer machine.
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-lawsynth}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-lawsynth_local_password}
|
|
POSTGRES_DB: ${POSTGRES_DB:-lawsynth}
|
|
# Deterministic, locale-independent collation for reproducible ordering.
|
|
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
|
|
command:
|
|
- postgres
|
|
- -c
|
|
- max_connections=100
|
|
- -c
|
|
- shared_buffers=256MB
|
|
ports:
|
|
- "${POSTGRES_HOST_PORT:-5432}:5432"
|
|
volumes:
|
|
- lawsynth_pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-lawsynth} -d ${POSTGRES_DB:-lawsynth}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 15s
|
|
networks:
|
|
- lawsynth
|
|
|
|
networks:
|
|
lawsynth:
|
|
|
|
volumes:
|
|
lawsynth_pgdata:
|