Commit 5857d2ef authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Escucha ruta raíz siempre y corrige variable

Permite entrada a / desde ambos servicios, por si uno de ellos falta en
un momento dado, poder seguir atendiendo a la petición de ruta raíz. Sin
embargo, como ya la imagen original tiene soporte para redireccionar
peticiones a ruta raíz, se descarta el router Traefik para ello.

Corrige nombre de variable antiguo, usada para deshabilitar interfaz web
de administración (se había actualizado sólo para servicio
geoserver-node).
parent ed2e2a54
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -64,12 +64,15 @@ x-geoserver-deploy: &geoserver-deploy

x-geoserver-traefik-common-service-labels: &geoserver-traefik-common-service-labels
  traefik.enable: ${TRAEFIK_ENABLE}

  traefik.http.services.geoserver.loadbalancer.server.port: ${GEOSERVER_PORT}

  traefik.http.services.geoserver.loadbalancer.sticky.cookie: 'true'
  traefik.http.services.geoserver.loadbalancer.sticky.cookie.name: ${TRAEFIK_COOKIE_NAME}
  traefik.http.services.geoserver.loadbalancer.sticky.cookie.httponly: '${TRAEFIK_COOKIE_HTTPONLY}'
  traefik.http.services.geoserver.loadbalancer.sticky.cookie.secure: '${TRAEFIK_COOKIE_SECURE}'
  traefik.http.services.geoserver.loadbalancer.sticky.cookie.samesite: ${TRAEFIK_COOKIE_SAMESITE}

  traefik.http.services.geoserver.loadbalancer.healthcheck.path: ${GEOSERVER_HEALTH_PATH}
  traefik.http.services.geoserver.loadbalancer.healthcheck.headers.authorization: ${TRAEFIK_HEALTH_AUTH}

@@ -80,7 +83,7 @@ services:
      << : *geoserver-environment
      TOGGLE_MASTER: 'true'
      TOGGLE_SLAVE: 'false'
      WEB_INTERFACE: 'false'
      DISABLE_WEB_INTERFACE: 'false'
      EMBEDDED_BROKER: enabled
      BROKER_URL: 'tcp://0.0.0.0:${BROKER_PORT}'
      READONLY: disabled
@@ -97,7 +100,7 @@ services:
        traefik.http.routers.geoserver-master-admin.service: geoserver-master

        traefik.http.routers.geoserver-master.entrypoints: ${TRAEFIK_ENTRYPOINT}
        traefik.http.routers.geoserver-master.rule: Host(`${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}`) && PathPrefix(`/geoserver`)
        traefik.http.routers.geoserver-master.rule: Host(`${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}`)
        traefik.http.routers.geoserver-master.service: geoserver

        traefik.http.services.geoserver-master.loadbalancer.server.port: ${GEOSERVER_PORT}
@@ -122,12 +125,7 @@ services:
        << : *geoserver-traefik-common-service-labels

        traefik.http.routers.geoserver-node.entrypoints: ${TRAEFIK_ENTRYPOINT}
        traefik.http.routers.geoserver-node.rule: Host(`${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}`) && PathPrefix(`/geoserver`)

        traefik.http.routers.geoserver-root.entrypoints: ${TRAEFIK_ENTRYPOINT}
        traefik.http.routers.geoserver-root.rule: Host(`${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}`) && PathPrefix(`/`)
        traefik.http.middlewares.geoserver-addprefix.addprefix.prefix: /geoserver
        traefik.http.routers.geoserver-root.middlewares: geoserver-addprefix
        traefik.http.routers.geoserver-node.rule: Host(`${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}`)

  postgres-gwc:
    image: ${POSTGRES_IMAGE_NAME:-postgres}:${POSTGRES_IMAGE_TAG:-alpine}