Change PostgreSQL data directory to /var/lib/postgresql/
Starting with PostgreSQL 18, the data directory (PGDATA) of the Docker Image has changed to be version specific. For PostgreSQL 18 it is /var/lib/postgresql/18/docker/. This means that to persist data, mounts and volumes should target the new location: /var/lib/postgresql/. Fixes DioCrafts/OxiCloud#281
This commit is contained in:
@@ -1039,7 +1039,7 @@ services:
|
||||
networks:
|
||||
- oxicloud
|
||||
volumes:
|
||||
- pg_data:/var/lib/postgresql/data
|
||||
- pg_data:/var/lib/postgresql/
|
||||
- ./db/schema.sql:/docker-entrypoint-initdb.d/10-schema.sql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
|
||||
Reference in New Issue
Block a user