diff --git a/README.md b/README.md index a86574c..c787936 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,8 @@ Persistent development/production databases record applied-file checksums. Editi `DATABASE_URL` directs status/validate/migrate at an explicitly supplied persistent database. Otherwise they use `pgstencil_dev`. Schema/type commands always use a disposable migrated clone. Never point template management at a production cluster. +Local services run PostgreSQL 18. The 18 image keeps its data under `/var/lib/postgresql/18/docker` and refuses a volume holding a 17 cluster, so the volume is named `postgres-18-data` and an existing checkout starts a fresh development database. The old volume stays until removed with `docker volume rm _postgres-data`; `docker volume ls` lists it. + ## Resource lifecycle Each checkout has a Compose project name derived from its absolute path, its own network, and a named Postgres volume. Local credentials and resolved ports are cached in ignored `.pgstencil/services.json`. Both exposed service ports bind to loopback. Change image versions in `compose.yaml`, then stop and restart the services; do not change Postgres major versions against an existing volume without a database upgrade. diff --git a/compose.yaml b/compose.yaml index c5fef9d..a680aeb 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,12 +1,12 @@ services: postgres: - image: postgres:17.11-alpine + image: postgres:18.6-alpine environment: POSTGRES_USER: pgstencil POSTGRES_PASSWORD: pgstencil-local-only POSTGRES_DB: postgres command: [postgres, -c, max_connections=200] - volumes: [postgres-data:/var/lib/postgresql/data] + volumes: [postgres-18-data:/var/lib/postgresql] ports: ['127.0.0.1::5432'] healthcheck: test: [CMD-SHELL, 'pg_isready -U pgstencil -d postgres'] @@ -27,4 +27,4 @@ services: condition: service_healthy ports: ['127.0.0.1::5000'] volumes: - postgres-data: + postgres-18-data: