chore(templates): move the API starters to PostgreSQL 18 - #42
Merged
Conversation
seamless-cli now scaffolds and conformance-tests PostgreSQL 18, so a project from `seamless init` named two different majors in the same directory: postgres:18 in the CLI-generated compose file and postgres:16-alpine in the API starter beside it. The volume mount moves with the tag. PostgreSQL 18+ images store data in a major-versioned subdirectory (/var/lib/postgresql/18/docker), so the mount is now /var/lib/postgresql. Leaving it at /var/lib/postgresql/data is not a cosmetic mismatch: the container treats the mount as unused and refuses to start, restart-looping on `Error: in 18+, these Docker images are configured to store database data in a format which is compatible with "pg_ctlcluster"`. Verified by standing the starter's db service up both ways.
This was referenced Aug 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #41.
seamless-climoved to PostgreSQL 18 (fells-code/seamless-cli#164), so a project fromseamless initwas naming two majors in the same directory:postgres:18in the CLI-generated compose file andpostgres:16-alpinein the API starter copied in beside it.The tag was not the whole change
Bumping just the image breaks the starter. PostgreSQL 18+ images store data in a major-versioned subdirectory (
/var/lib/postgresql/18/docker), and the mount has to move up a level to match. With the old/var/lib/postgresql/datamount the container treats the volume as unused and refuses to start, restart-looping on:See docker-library/postgres#1259. So this PR is two changes, not one:
postgres:16-alpinepostgres:18-alpinepgdata:/var/lib/postgresql/datapgdata:/var/lib/postgresqlA comment on the mount records why, since the path now looks wrong to anyone who knows the old convention.
Verified, not assumed
I stood the express starter's
dbservice up on a fresh volume both ways:restarting, the error above in a loop.running (healthy),PostgreSQL 18.4 on aarch64-unknown-linux-musl, andPGDATA=/var/lib/postgresql/18/dockerresolving inside the mounted volume, so data actually persists.npm run validatepasses.Blast radius
None for existing projects. Starter files are copied in at scaffold time, so a project keeps the compose file it was created with. Only newly scaffolded projects get 18, on a fresh volume.
Follow-ups this uncovered
The mount-path change applies to every other postgres pin in the org, and none of the issues I filed mentioned it, because I did not know until I tested this one. Notably
seamless-cli's own generated compose has the same defect and is already merged (fells-code/seamless-cli#164 pinspostgres:18with a/var/lib/postgresql/datamount). Fixing that is next; its CI missed it because the verify harness's postgres has no volume mount at all.After this merges: tag a templates release, then bump
SEAMLESS_TEMPLATES_REFinseamless-cli/src/core/images.ts.