Repository navigation
Let the server keep Postgres on its data disk; pin postgres 18 - #103
Merged
Merged
Conversation
DB_DATA in .env picks where Postgres keeps its files. Without it the db keeps the pgdata volume, so this changes nothing until the server sets it. Prod would set /data/lm-dashboard/postgres, so the database lives on the data disk and outlives the root disk. postgres:latest would move to a new major version on the next pull, and a new major cannot open this one's data folder, so the image is pinned to 18, the version running now (18.4).
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.
Part of the INVITE server layout cleanup (28 October 2026): code in
/var/www/<app>, data that cannot be rebuilt in/data/<app>. Please review: nothing on the server moves until you agree.What changed
DB_DATAin.envpicks where Postgres keeps its files. Without it the database keeps thepgdatavolume, so merging this changes nothing on the server or on a laptop.postgres:latestbecomespostgres:18. Prod runs 18.4. Once Postgres 19 is out, a pull oflatestwould give a container that refuses to open version 18 data.docs/guides/configuration.mddescribesDB_DATA.The move, after merge (about a minute of database downtime)
db./data/lm-dashboard/postgres, keeping their owner.DB_DATA=/data/lm-dashboard/postgresin the server's.env.docker compose -f compose.yml up -d.The old volume stays for a week as a fallback.
How it was checked
docker compose -f compose.yml config: withoutDB_DATAthe volume is the existing production volume, as before; with it, a bind mount of the folder. The image resolves topostgres:18.Nightly dumps of this database now go to
/var/backups/appson the root disk and/data/backups/db(restore checked: row counts match).