use subdirectory for pgdata to support non-empty mounted volumes

This commit is contained in:
Markus Kahl
2022-03-14 15:27:52 +00:00
parent 1409deacca
commit 71f51c4fc5

View File

@@ -37,6 +37,11 @@ services:
environment:
POSTGRES_PASSWORD: p4ssw0rd
POSTGRES_DB: openproject
# Use subdirectory for PGDATA so that mounted volumes don't have to be empty.
# For example, this is important when mounting an ext4 file system where
# a lost+found directory will be automatically created once mounted.
# This would then cause initdb to fail due to the PGDATA directory not being empty.
PGDATA: /var/lib/postgresql/data/pgdata
networks:
- backend