services/postgres/docker-compose.yml

22 lines
576 B
YAML
Raw Permalink Normal View History

---
volumes:
postgres:
name: ${POSTGRES_VOLUME_NAME:-postgres}
services:
postgres:
container_name: ${POSTGRES_CONTAINER_NAME:-postgres}
image: ${POSTGRES_IMAGE:-postgres:14.2-alpine}
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER:?err}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?err}
POSTGRES_DB: ${POSTGRES_DB:?err}
PUID: ${POSTGRES_PUID:-1000}
PGID: ${POSTGRES_PGID:-1000}
volumes:
- postgres:/var/lib/postgresql/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro