Files
Oxicloud/docker-compose.yml
T
Mathieu Boutolleau 3e23d9541b 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
2026-04-11 21:39:11 +02:00

46 lines
814 B
YAML

services:
postgres:
image: postgres:18.2-alpine3.23
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: oxicloud
ports:
- "5432:5432"
networks:
- oxicloud
volumes:
- pg_data:/var/lib/postgresql/
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
oxicloud:
image: oxicloud
restart: always
build:
context: .
dockerfile: Dockerfile
ports:
- "8086:8086"
networks:
- oxicloud
depends_on:
postgres:
condition: service_healthy
env_file:
- .env
volumes:
- storage_data:/app/storage
networks:
oxicloud:
driver: bridge
volumes:
pg_data:
storage_data: