em-shop/postgres/docker-compose.yml
2024-11-20 09:53:03 +05:00

21 lines
568 B
YAML
Executable File

services:
postgres:
container_name: postgres
image: postgres:16.4-alpine3.20
restart: unless-stopped
networks:
- proxynet
env_file:
- ./config.env
environment:
PG_DATA: /var/lib/postgresql/data
volumes:
- ./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