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