Skip to content

Conversation

@Youngsie1997
Copy link
Contributor

  1. Specified PostgreSQL version as previous discussed in Created docker compose file #4.
  2. Specified variables for the database user and database name.
  3. Create a directory for data persistence. which I then added to the .gitignore

Note regarding the data directory.
Important Change: the PGDATA environment variable of the image was changed to be version specific in PostgreSQL 18 and above⁠. For 18 it is /var/lib/postgresql/18/docker. Later versions will replace 18 with their respective major version (e.g., /var/lib/postgresql/19/docker for PostgreSQL 19.x). The defined VOLUME was changed in 18 and above to /var/lib/postgresql. Mounts and volumes should be targeted at the updated location. This will allow users upgrading between PostgreSQL major releases to use the faster --link when running pg_upgrade and mounting /var/lib/postgresql.

Specificed postgres version as previous discussed in #4, Specified
variables for the database user and database name and created a
directory such that database data will persist throughout image deletion
Copy link
Contributor

@freeborough freeborough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and a great comment - learnt some postgres docker stuff!

@freeborough freeborough merged commit 82dace1 into main Nov 29, 2025
@Youngsie1997 Youngsie1997 deleted the docker-compose-refinement branch November 29, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants