Agregar integración con Traefik y consolidar workflow
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 42s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 42s
- Agregar labels de Traefik al servicio radiusnucleo-node para exposición en wifi.nucleoriofrio.com - Configurar autenticación con Authentik y soporte para SSE/WebSocket - Renombrar servicio node a radiusnucleo-node con container_name explícito - Actualizar redes a radiusnucleo_radius_net como externa - Consolidar workflow de Gitea en un solo job build-and-deploy - Agregar creación automática de red radiusnucleo_radius_net en workflow
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
node:
|
||||
radiusnucleo-node:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: node-api/Dockerfile
|
||||
image: gitea.nucleoriofrio.com/nucleo000/radiusnucleo:latest
|
||||
container_name: radiusnucleo-node-1
|
||||
environment:
|
||||
- VLAN_ID=2
|
||||
- MAX_UP=10000000
|
||||
@@ -19,16 +20,42 @@ services:
|
||||
- PGUSER=radius
|
||||
- PGPASSWORD=radius
|
||||
networks:
|
||||
radius_net:
|
||||
principal:
|
||||
aliases:
|
||||
- radiusnucleo-node
|
||||
- principal
|
||||
- radiusnucleo_radius_net
|
||||
labels:
|
||||
# Habilitar Traefik
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=principal"
|
||||
|
||||
# Router principal
|
||||
- "traefik.http.routers.wifi-nucleoriofrio.rule=Host(`wifi.nucleoriofrio.com`)"
|
||||
- "traefik.http.routers.wifi-nucleoriofrio.entrypoints=websecure"
|
||||
- "traefik.http.routers.wifi-nucleoriofrio.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.wifi-nucleoriofrio.service=wifi-nucleoriofrio-service"
|
||||
- "traefik.http.routers.wifi-nucleoriofrio.middlewares=authentik-forward-auth@file,wifi-headers@docker"
|
||||
|
||||
# Service - Puerto y configuraciones SSE
|
||||
- "traefik.http.services.wifi-nucleoriofrio-service.loadbalancer.server.port=3000"
|
||||
- "traefik.http.services.wifi-nucleoriofrio-service.loadbalancer.passhostheader=true"
|
||||
- "traefik.http.services.wifi-nucleoriofrio-service.loadbalancer.responseforwarding.flushinterval=1ms"
|
||||
- "traefik.http.services.wifi-nucleoriofrio-service.loadbalancer.serverstransport=wifi-transport@docker"
|
||||
|
||||
# Middleware: wifi-headers
|
||||
- "traefik.http.middlewares.wifi-headers.headers.customrequestheaders.X-Forwarded-Proto=https"
|
||||
- "traefik.http.middlewares.wifi-headers.headers.customrequestheaders.X-Forwarded-Scheme=https"
|
||||
|
||||
# ServersTransport para SSE/WebSocket
|
||||
- "traefik.http.serverstransports.wifi-transport.servername=radiusnucleo-node-1"
|
||||
- "traefik.http.serverstransports.wifi-transport.insecureskipverify=false"
|
||||
- "traefik.http.serverstransports.wifi-transport.forwardingtimeouts.dialtimeout=30s"
|
||||
- "traefik.http.serverstransports.wifi-transport.forwardingtimeouts.responseheadertimeout=0s"
|
||||
- "traefik.http.serverstransports.wifi-transport.forwardingtimeouts.idleconntimeout=90s"
|
||||
|
||||
freeradius:
|
||||
build: ./freeradius
|
||||
image: gitea.nucleoriofrio.com/nucleo000/radiusnucleo-freeradius:latest
|
||||
depends_on:
|
||||
- node
|
||||
- radiusnucleo-node
|
||||
- postgres
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
@@ -39,7 +66,7 @@ services:
|
||||
- RADIUS_CLIENTS_CIDR=${RADIUS_CLIENTS_CIDR:-192.168.87.0/24}
|
||||
- RADIUS_SHARED_SECRET=${RADIUS_SHARED_SECRET:-tamosbien}
|
||||
networks:
|
||||
- radius_net
|
||||
- radiusnucleo_radius_net
|
||||
- principal
|
||||
|
||||
postgres:
|
||||
@@ -52,14 +79,14 @@ services:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./postgres/init:/docker-entrypoint-initdb.d:ro
|
||||
networks:
|
||||
- radius_net
|
||||
- radiusnucleo_radius_net
|
||||
- principal
|
||||
|
||||
networks:
|
||||
radius_net:
|
||||
driver: bridge
|
||||
principal:
|
||||
external: true
|
||||
radiusnucleo_radius_net:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
Reference in New Issue
Block a user