postgres/docker-compose.yml
2024-08-08 05:52:26 +05:00

24 lines
684 B
YAML

services:
postgres:
container_name: postgres
image: postgres:16.3-alpine3.19
restart: always
networks:
- proxynet
env_file:
- /data/secrets/${SERVER_DOMAIN}/${SERVER_DOMAIN}.env
environment:
PG_DATA: /var/lib/postgresql/data
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- /data/appdata/pgdata:/var/lib/postgresql/data
labels:
- "traefik.enable=true"
- "traefik.tcp.routers.postgresql.rule=HostSNI(`*`)"
- "traefik.tcp.services.postgresql.loadbalancer.server.port=5432"
- "traefik.tcp.routers.postgresql.entrypoints=postgres"
networks:
proxynet:
external: true