2024-08-08 05:52:26 +05:00
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
container_name: postgres
|
2024-08-31 02:26:15 +05:00
|
|
|
image: postgres:16.4-alpine3.20
|
|
|
|
restart: unless-stopped
|
2024-08-08 05:52:26 +05:00
|
|
|
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
|