Skip to content

Conversation

@viadezo1er
Copy link
Contributor

@viadezo1er viadezo1er commented Feb 7, 2026

Postgre 18 has moved the volume mount point from /var/lib/postgresql/data to /var/lib/postgresql
Fixes #122

See line 194 of the Dockerfile of postgres:18-alpine:
https://github.com/docker-library/postgres/blob/22ca5c8d8e4b37bece4d38dbce1a060583b5308a/18/alpine3.22/Dockerfile#L194
NOTE: in 18+, PGDATA has changed to match the pg_ctlcluster standard directory structure, and the VOLUME has moved from /var/lib/postgresql/data to /var/lib/postgresql

So to prevent a useless volume being created for the postgre docker each time the container is started, accordingly update the mount point of the postgre volume.

After reading the Contributor Guidelines for etherpad-lite:

  • there isn't a develop branch for etherpad-go
  • it's a bug fix but I'm not sure a regression test is really needed here (I think they are aimed at Typescript/Go bugs, not docker bugs)
  • I have no idea how to run a go test suite, and it's probably irrelevant here anyway (works locally and on a VPS, data is persistent)
  • No documentation update needed

Postgre 18 has moved the volume mount point from /var/lib/postgresql/data to /var/lib/postgresql
Fixes ether#122
@viadezo1er
Copy link
Contributor Author

Sorry for the double PR (the other is closed), I incorrectly assumed the issue would be number 68.

@viadezo1er
Copy link
Contributor Author

At some point in the future, etherpad-lite might update from postgres:15-alpine to postgres:18-alpine or later, would it be relevant to add a warning in the docker-compose.yml in etherpad-lite repo?

@SamTV12345
Copy link
Member

At some point in the future, etherpad-lite might update from postgres:15-alpine to postgres:18-alpine or later, would it be relevant to add a warning in the docker-compose.yml in etherpad-lite repo?

Thanks for the pr. Yes this is an issue. Thanks for raising:

Important Note: (for PostgreSQL 17 and below) Mount the data volume at /var/lib/postgresql/data and not at /var/lib/postgresql because mounts at the latter path WILL NOT PERSIST database data when the container is re-created. The Dockerfile that builds the image declares a volume at /var/lib/postgresql/data and if no data volume is mounted at that path then the container runtime will automatically create an [anonymous volume](https://docs.docker.com/engine/storage/#volumes) that is not reused across container re-creations. Data will be written to the anonymous volume rather than your intended data volume and won't persist when the container is deleted and re-created.

@SamTV12345
Copy link
Member

You can run the tests with e.g. Docker Desktop installed. Just by doing go test ./... Pretty cool that everything is integrated in the toolchain

@SamTV12345 SamTV12345 merged commit f17f344 into ether:main Feb 9, 2026
6 checks passed
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.

Postgre compose.yml creates two volumes instead of one

2 participants