EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit afb8e760 authored by Lubomir Dolezal's avatar Lubomir Dolezal
Browse files

add traefik to each dev deployment

allows to use same urls for client in dev and ops
parent 454ca3a7
No related branches found
No related tags found
No related merge requests found
......@@ -385,6 +385,18 @@ secrets:
target: /index.html
networks:
- extnet
deploy:
labels:
# router for basic access (http)
- "traefik.http.routers.{{slug}}-client.rule=Host(`{{slug}}.localhost`)"
- "traefik.http.routers.{{slug}}-client.middlewares=compress@file"
- "traefik.http.routers.{{slug}}-client.entrypoints=http"
# general
- "traefik.http.services.{{slug}}-client.loadbalancer.sticky=false"
- "traefik.http.services.{{slug}}-client.loadbalancer.server.port=80"
- "traefik.docker.network={{slug}}-extnet"
- "traefik.docker.lbswarm=true"
- "traefik.enable=true"
renderer:
image: registry.gitlab.eox.at/vs/core:dev
environment:
......@@ -392,6 +404,18 @@ secrets:
DEBUG: "true"
networks:
- extnet
deploy:
labels:
# router for basic access (http)
- "traefik.http.routers.{{slug}}-renderer.rule=Host(`{{slug}}.localhost`) && PathPrefix(`/ows`, `/opensearch`, `/admin`, `/htttp`)"
- "traefik.http.routers.{{slug}}-renderer.middlewares=compress@file,cors@file"
- "traefik.http.routers.{{slug}}-renderer.entrypoints=http"
# general
- "traefik.http.services.{{slug}}-renderer.loadbalancer.sticky=false"
- "traefik.http.services.{{slug}}-renderer.loadbalancer.server.port=80"
- "traefik.docker.network={{slug}}-extnet"
- "traefik.docker.lbswarm=true"
- "traefik.enable=true"
registrar:
image: registry.gitlab.eox.at/vs/core:dev
environment:
......@@ -401,6 +425,19 @@ secrets:
image: registry.gitlab.eox.at/vs/cache:dev
networks:
- extnet
deploy:
labels:
# router for basic access (http)
- "traefik.http.middlewares.cache-stripprefix.stripprefix.prefixes=/cache"
- "traefik.http.routers.{{slug}}-cache.rule=Host(`{{slug}}.localhost`) && PathPrefix(`/cache`)"
- "traefik.http.routers.{{slug}}-cache.middlewares=cache-stripprefix,compress@file,cors@file"
- "traefik.http.routers.{{slug}}-cache.entrypoints=http"
# general
- "traefik.http.services.{{slug}}-cache.loadbalancer.sticky=false"
- "traefik.http.services.{{slug}}-cache.loadbalancer.server.port=80"
- "traefik.docker.network={{slug}}-extnet"
- "traefik.docker.lbswarm=true"
- "traefik.enable=true"
preprocessor:
image: registry.gitlab.eox.at/vs/preprocessor:dev
environment:
......@@ -408,8 +445,21 @@ secrets:
volumes:
- type: tmpfs
target: /tmp
reverse-proxy:
image: traefik:2.4
ports:
- target: 80
published: 80
protocol: tcp
mode: host
volumes:
# point to configs/base when rendered
- /var/run/docker.sock:/var/run/docker.sock
- ../base/traefik.yml:/etc/traefik/traefik.yml
- ../base/traefik-dynamic.yml:/etc/traefik/traefik-dynamic.yml
networks:
- extnet
networks:
extnet:
name: {{slug}}-extnet
external: true
{%- endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment