Hi,
I have issues deploying PostgreSQL data base with traefik
This is my conf
version: "3.3"
services:
traefik:
image: "traefik:v3.2"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.web.address=:80"
- "--entryPoints.db.address=:5432"
ports:
- "80:80"
- "8080:8080"
#- "5432:5432"
volumes:
- "/run/podman/podman.sock:/var/run/docker.sock:ro"
networks:
- traefik_net # Esto es correcto. Aquí se conecta a la red externa.
networks:
traefik_net:
external: true # La red externa debe ser definida aquí, fuera de los servicios.
version: '3.9'
services:
postgres:
image: postgres:14-alpine
container_name: postgres
restart: unless-stopped
ports:
- 5432:5432 # Exponer el puerto 5432 para acceso local
volumes:
- ./postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
labels:
- "traefik.enable=true" # Habilitar el servicio para Traefik
- "traefik.tcp.routers.postgres.rule= HostSNI(`db.sky.co`)" # Host TCP para PostgreSQL
- "traefik.tcp.routers.postgres.entrypoints=db" # EntryPoint TCP configurado en Traefik
- "traefik.tcp.services.postgres.loadbalancer.server.port=5432" # Puerto 5432 de PostgreSQL dentro del contenedor
networks:
- traefik_net
networks:
traefik_net:
external: true
Have error in hostSNI entry db service posgres
ERRORS
invalid rule: " HostSNI(db.smy.co
)" , has HostSNI matcher, but no TLS on router
Let me know how can solve.