From d5307029b3a995aff1adc45cf4b48d4e5af70889 Mon Sep 17 00:00:00 2001 From: Loraine Gueguen <loraine.gueguen@sb-roscoff.fr> Date: Thu, 20 May 2021 23:23:52 +0200 Subject: [PATCH] fix None check in compose template --- templates/gspecies_compose.yml.j2 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/templates/gspecies_compose.yml.j2 b/templates/gspecies_compose.yml.j2 index 3b4bdbb..0ff9df0 100644 --- a/templates/gspecies_compose.yml.j2 +++ b/templates/gspecies_compose.yml.j2 @@ -14,7 +14,7 @@ services: labels: # Download page - "traefik.http.routers.{{ genus_species }}-nginx.rule=(Host(`{{ hostname }}`) && PathPrefix(`/sp/{{ genus_species }}/download`))" - {% if https_port is defined %} + {% if https_port is defined and https_port %} - "traefik.http.routers.{{ genus_species }}-nginx.tls=true" - "traefik.http.routers.{{ genus_species }}-nginx.entryPoints=webs" - "traefik.http.routers.{{ genus_species }}-nginx.middlewares=sp-auth,sp-app-trailslash,sp-prefix" @@ -38,11 +38,11 @@ services: - ./docker_data/galaxy/:/export/:ro - ./src_data/:/project_data/:ro - ./src_data:/data:ro - {% if tripal_banner_path is defined %} + {% if tripal_banner_path is defined and tripal_banner_path %} - ./banner.png:/var/www/html/banner.png:ro {% endif %} #- /groups/XXX/:/groups/XXX/:ro # We do this when we have symlinks in src_data pointing to /groups/XXX/... - {% if picture_path is defined %} + {% if picture_path is defined and picture_path %} {% if 'png' in picture_path %} - ./species.png:/var/www/html/species.png:ro {% endif %} @@ -77,7 +77,7 @@ services: deploy: labels: - "traefik.http.routers.{{ genus_species }}-tripal.rule=(Host(`{{ hostname }}`) && PathPrefix(`/sp/{{ genus_species }}`))" - {% if https_port is defined %} + {% if https_port is defined and https_port %} - "traefik.http.routers.{{ genus_species }}-tripal.tls=true" - "traefik.http.routers.{{ genus_species }}-tripal.entryPoints=webs" - "traefik.http.routers.{{ genus_species }}-tripal.middlewares=sp-auth,sp-trailslash,sp-prefix,tripal-addprefix" @@ -123,7 +123,7 @@ services: galaxy: image: quay.io/galaxy-genome-annotation/docker-galaxy-annotation:gmod volumes: - {% if (galaxy_persist_data is defined) and (galaxy_persist_data == "False") %} + {% if (galaxy_persist_data is defined and galaxy_persist_data) and (galaxy_persist_data == "False") %} #- ./docker_data/galaxy/:/export/ {% else %} - ./docker_data/galaxy/:/export/ @@ -161,7 +161,7 @@ services: deploy: labels: - "traefik.http.routers.{{ genus_species }}-galaxy.rule=(Host(`{{ hostname }}`) && PathPrefix(`/sp/{{ genus_species }}/galaxy`))" - {% if https_port is defined %} + {% if https_port is defined and https_port %} - "traefik.http.routers.{{ genus_species }}-galaxy.tls=true" - "traefik.http.routers.{{ genus_species }}-galaxy.entryPoints=webs" - "traefik.http.routers.{{ genus_species }}-galaxy.middlewares=sp-auth,sp-app-trailslash,sp-app-prefix" @@ -192,7 +192,7 @@ services: deploy: labels: - "traefik.http.routers.{{ genus_species }}-jbrowse.rule=(Host(`{{ hostname }}`) && PathPrefix(`/sp/{{ genus_species }}/jbrowse`))" - {% if https_port is defined %} + {% if https_port is defined and https_port %} - "traefik.http.routers.{{ genus_species }}-jbrowse.tls=true" - "traefik.http.routers.{{ genus_species }}-jbrowse.entryPoints=webs" - "traefik.http.routers.{{ genus_species }}-jbrowse.middlewares=sp-auth,sp-app-trailslash,sp-app-prefix" @@ -207,7 +207,7 @@ services: max_attempts: 3 window: 120s - {% if blast is defined and blast == 1 %} + {% if blast is defined and blast and blast == 1 %} blast: image: quay.io/abretaud/sf-blast:latest depends_on: @@ -252,7 +252,7 @@ services: deploy: labels: - "traefik.http.routers.{{ genus_species }}-blast.rule=(Host(`{{ hostname }}`) && PathPrefix(`/sp/{{ genus_species }}/blast`))" - {% if https_port is defined %} + {% if https_port is defined and https_port %} - "traefik.http.routers.{{ genus_species }}-blast.tls=true" - "traefik.http.routers.{{ genus_species }}-blast.entryPoints=webs" - "traefik.http.routers.{{ genus_species }}-blast.middlewares=sp-big-req,sp-auth,sp-app-trailslash,sp-app-prefix" -- GitLab