diff --git a/.agents/skills/infra/docker-dev/SKILL.md b/.agents/skills/infra/docker-dev/SKILL.md index 859be96e..c81ebbd3 100644 --- a/.agents/skills/infra/docker-dev/SKILL.md +++ b/.agents/skills/infra/docker-dev/SKILL.md @@ -47,6 +47,12 @@ docker compose -f docker/compose.yaml --profile postgres up docker compose -f docker/compose.yaml --profile minio up # console on 9001 ``` +If `postgres` exits 1 before printing a single server line, and the message names +`pg_ctlcluster` and a major-version directory, the volume was written by an older major +version. Postgres 18 keeps its cluster under `/var/lib/postgresql/18/` and will not adopt +one left by 16. `docker volume rm visionset_postgres-data` clears it; nothing reads this +service, so there is nothing in there to keep. + ## The three ways to run it The stack has three permanent, mutually compatible configurations. They differ in one diff --git a/docker/compose.yaml b/docker/compose.yaml index 5072c880..6ea38a89 100644 --- a/docker/compose.yaml +++ b/docker/compose.yaml @@ -265,7 +265,7 @@ services: # why they sit behind profiles and are off by default. postgres: profiles: ["postgres"] - image: postgres:16 + image: postgres:18 environment: POSTGRES_DB: visionset POSTGRES_USER: visionset @@ -273,7 +273,14 @@ services: ports: - "5432:5432" volumes: - - postgres-data:/var/lib/postgresql/data + # The whole directory, not the `data/` beneath it. From 18 the image keeps its + # cluster in a major-version subdirectory and refuses to start at all — exit 1 + # before any server — when it finds a mount on the old path, so bumping the tag + # without moving this line takes the profile down. A cluster written by 16 is + # unreadable to 18 wherever it is mounted: `docker volume rm + # visionset_postgres-data` is the way through, and costs nothing while nothing + # is wired to this service. + - postgres-data:/var/lib/postgresql minio: profiles: ["minio"]