EOX GitLab Instance

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

Merge branch 'dem-app-deploy' into 'main'

Dem app deploy

See merge request !2
parents c4d2badb 39b7b2a7
No related branches found
No related tags found
1 merge request!2Dem app deploy
Pipeline #21536 passed
......@@ -5,7 +5,7 @@ long_description = ""
setup(
name="vs-starter",
version="0.0.1",
version="0.0.2",
author="",
author_email="",
description="PRISM docker swarm config generator for the view server",
......
......@@ -339,6 +339,43 @@ services:
- "traefik.enable=true"
networks:
- extnet
dem-app:
image: registry.gitlab.eox.at/esa/prism/dem-app:latest
deploy:
labels:
- "traefik.http.middlewares.dem-app-stripprefix.stripprefix.prefixes=/dem-app"
# router for shib auth based access (https)
- "traefik.http.routers.{{slug}}-dem-app-shib.rule=Host(`sso.{{slug}}.pass.copernicus.eu`) && PathPrefix(`/dem-app`)"
- "traefik.http.middlewares.{{slug}}-dem-app-shib-fa.forwardauth.address=http://shibauth-{{slug}}/secure"
- "traefik.http.routers.{{slug}}-dem-app-shib.middlewares=dem-app-stripprefix,{{slug}}-dem-app-shib-fa,compress@file"
- "traefik.http.routers.{{slug}}-dem-app-shib.tls=true"
- "traefik.http.routers.{{slug}}-dem-app-shib.tls.certresolver=default"
- "traefik.http.routers.{{slug}}-dem-app-shib.entrypoints=https"
# router for shib auth based access (http)
- "traefik.http.routers.{{slug}}-dem-app-redirect-shib.rule=Host(`sso.{{slug}}.pass.copernicus.eu`) && PathPrefix(`/dem-app`)"
- "traefik.http.routers.{{slug}}-dem-app-redirect-shib.middlewares=dem-app-stripprefix,redirect@file"
- "traefik.http.routers.{{slug}}-dem-app-redirect-shib.entrypoints=http"
# router for basic auth based access (https)
- "traefik.http.routers.{{slug}}-dem-app.rule=Host(`{{slug}}.pass.copernicus.eu`, `{{slug}}.pdas.prism.eox.at`) && PathPrefix(`/dem-app`)"
- "traefik.http.routers.{{slug}}-dem-app.middlewares=dem-app-stripprefix,auth@file,compress@file"
- "traefik.http.routers.{{slug}}-dem-app.tls=true"
- "traefik.http.routers.{{slug}}-dem-app.tls.certresolver=default"
- "traefik.http.routers.{{slug}}-dem-app.entrypoints=https"
# router for basic auth based access (http)
- "traefik.http.routers.{{slug}}-dem-app-redirect.rule=Host(`{{slug}}.pass.copernicus.eu`, `{{slug}}.pdas.prism.eox.at`) && PathPrefix(`/dem-app`)"
- "traefik.http.routers.{{slug}}-dem-app-redirect.middlewares=dem-app-stripprefix,redirect@file"
- "traefik.http.routers.{{slug}}-dem-app-redirect.entrypoints=http"
# general
- "traefik.http.services.{{slug}}-dem-app.loadbalancer.sticky=false"
- "traefik.http.services.{{slug}}-dem-app.loadbalancer.server.port=80"
- "traefik.docker.network={{slug}}-extnet"
- "traefik.docker.lbswarm=true"
- "traefik.enable=true"
placement:
constraints:
- node.labels.type == external
networks:
- extnet
{%- endif %}
networks:
extnet:
......@@ -381,7 +418,7 @@ secrets:
volumes:
- type: bind
source: ./config/index.html
target: /index.html
target: /opt/client/index.html
networks:
- extnet
deploy:
......@@ -406,7 +443,7 @@ secrets:
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.rule=Host(`{{slug}}.localhost`) && PathPrefix(`/ows`, `/opensearch`, `/admin`, `/http`)"
- "traefik.http.routers.{{slug}}-renderer.middlewares=compress@file,cors@file"
- "traefik.http.routers.{{slug}}-renderer.entrypoints=http"
# general
......@@ -458,6 +495,25 @@ secrets:
- ../base/traefik-dynamic.yml:/etc/traefik/traefik-dynamic.yml
networks:
- extnet
{%- if slug in ["dem", "demF"] %}
dem-app:
image: registry.gitlab.eox.at/esa/prism/dem-app:dev
deploy:
labels:
# router for basic access (http)
- "traefik.http.middlewares.dem-app-stripprefix.stripprefix.prefixes=/dem-app"
- "traefik.http.routers.{{slug}}-dem-app.rule=Host(`{{slug}}.localhost`) && PathPrefix(`/dem-app`)"
- "traefik.http.routers.{{slug}}-dem-app.middlewares=dem-app-stripprefix,compress@file"
- "traefik.http.routers.{{slug}}-dem-app.entrypoints=http"
# general
- "traefik.http.services.{{slug}}-dem-app.loadbalancer.sticky=false"
- "traefik.http.services.{{slug}}-dem-app.loadbalancer.server.port=80"
- "traefik.docker.network={{slug}}-extnet"
- "traefik.docker.lbswarm=true"
- "traefik.enable=true"
networks:
- extnet
{%- endif %}
networks:
extnet:
name: {{slug}}-extnet
......
......@@ -52,9 +52,7 @@ services:
GDAL_DISABLE_READDIR_ON_OPEN: "TRUE"
CPL_VSIL_CURL_ALLOWED_EXTENSIONS: ".TIF,.tif,.xml"
WORKER_TIMEOUT: 3600
{%- if slug in ["dem", "demF"] %}
ENABLE_HTTP_ACCESS: "true"
{%- endif %}
configs:
- source: init-db
target: /opt/core/init-db.sh
......@@ -150,6 +148,7 @@ services:
REPORTING_DIR: "/mnt/reports/"
GDAL_DISABLE_READDIR_ON_OPEN: "EMPTY_DIR"
CPL_VSIL_CURL_ALLOWED_EXTENSIONS: ".TIF,.tif,.xml"
ENABLE_HTTP_ACCESS: "true"
configs:
- source: init-db
target: /opt/core/init-db.sh
......
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