Skip to content

fix(docker): pin postgres image to 17 - #1371

Merged
itsalaidbacklife merged 2 commits into
mainfrom
fix/docker-compose-pin-postgres
Aug 6, 2026
Merged

fix(docker): pin postgres image to 17#1371
itsalaidbacklife merged 2 commits into
mainfrom
fix/docker-compose-pin-postgres

Conversation

@itsalaidbacklife

Copy link
Copy Markdown
Contributor

Summary

The packaged docker/docker-compose.yml pins the database service to postgres:latest. postgres:latest has advanced to PostgreSQL 18, which changed the container's data-directory layout and is incompatible with the existing /var/lib/postgresql/data bind mount — the database container crash-loops on start with:

Error: in 18+, these Docker images are configured to store database data in a format which is compatible with "pg_ctlcluster" ... there appears to be PostgreSQL data in: /var/lib/postgresql/data (unused mount/volume)

This makes npm run docker:start (and the packaged local DB) fail out of the box.

Fix

Pin the image to postgres:17, which uses the classic /var/lib/postgresql/data PGDATA and works with the current mount. Pinning also makes local DB runs reproducible.

Testing

  • With postgres:latest: database container status is Restarting (1) in a loop (reproduced).
  • With postgres:17: docker compose -f docker/docker-compose.yml up -d database → container Up, pg_isready passes, psql connects (PostgreSQL 17.10). Lifted the app against it in staging mode successfully.

Notes / follow-up

This restores the current behavior with minimal change. A larger follow-up could instead adopt the PG18 image guidance (mount a single volume at /var/lib/postgresql so pg_upgrade --link works) if the project wants to track the latest major — left out of scope here.

🤖 Generated with Claude Code

itsalaidbacklife and others added 2 commits August 4, 2026 16:19
postgres:latest advanced to PostgreSQL 18, which changed the container data-dir
layout and is incompatible with the compose's /var/lib/postgresql/data bind mount
(the database container crash-loops on start). Pin postgres:17 so the packaged
docker compose boots again; pinning also makes local DB runs reproducible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@itsalaidbacklife itsalaidbacklife added version-patch An update that warrants a bumping the project's patch version (e.g. 4.0.0 => 4.0.1) dev experience Improvements to the code base that make it easier/better/more enjoyable to contribute to Cuttle labels Aug 6, 2026
@itsalaidbacklife
itsalaidbacklife merged commit 5a698d4 into main Aug 6, 2026
9 checks passed
@itsalaidbacklife
itsalaidbacklife deleted the fix/docker-compose-pin-postgres branch August 6, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev experience Improvements to the code base that make it easier/better/more enjoyable to contribute to Cuttle version-patch An update that warrants a bumping the project's patch version (e.g. 4.0.0 => 4.0.1)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant