18 lines
603 B
YAML
18 lines
603 B
YAML
|
|
# PostgreSQL — centrale homelab-database (poort 5433 op host).
|
||
|
|
# NAS-pad: /volume1/docker/postgres/
|
||
|
|
# Start: cp .env.example .env && docker compose up -d
|
||
|
|
|
||
|
|
services:
|
||
|
|
postgres-homelab:
|
||
|
|
image: postgres:16-alpine
|
||
|
|
container_name: postgres-homelab
|
||
|
|
restart: unless-stopped
|
||
|
|
ports:
|
||
|
|
- "${PG_HOST_PORT:-5433}:5432"
|
||
|
|
environment:
|
||
|
|
POSTGRES_USER: ${POSTGRES_USER:-mo}
|
||
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Zet POSTGRES_PASSWORD in .env}
|
||
|
|
POSTGRES_DB: ${POSTGRES_DB:-homelab}
|
||
|
|
volumes:
|
||
|
|
- ${PG_DATA_DIR:-/volume1/docker/postgres/data}:/var/lib/postgresql/data
|