diff --git a/gga_init.py b/gga_init.py index 46e104a241df6214d6535c2dce0d772d6a7151fd..19aa31dc9dc5f93734df73c0afaba7b7f5d2e1b0 100755 --- a/gga_init.py +++ b/gga_init.py @@ -83,11 +83,6 @@ class DeploySpeciesStack(speciesData.SpeciesData): except Exception as exc: logging.critical("Could not copy nginx configuration file for %s" % self.full_name) logging.critical(exc) - # with open(os.path.abspath("./nginx/conf/default.conf"), 'w') as conf: - # conf.write("server {\n\tlisten 80;\n\tserver_name ~.;\n\tlocation /download/ {\n\t\talias /project_data/; \n\t\tautoindex on;\n\t}\n}") # The species nginx conf - # except OSError as exc: - # logging.critical("Cannot write NginX conf file") - # sys.exit(exc) # Return to main directory os.chdir(self.main_dir) @@ -111,7 +106,7 @@ class DeploySpeciesStack(speciesData.SpeciesData): # Jinja2 templating, handled using the python "jinja2" module file_loader = FileSystemLoader(self.script_dir + "/templates") - env = Environment(loader=file_loader) + env = Environment(loader=file_loader, trim_blocks=True, lstrip_blocks=True) # We need a dict holding all key (variables) - values that needs to be replaced in the template as our rendering dict # To do so we need both input file vars and config vars diff --git a/templates/galaxy_nginx.conf.j2 b/templates/galaxy_nginx.conf.j2 index 5d05b1f05285e6a9109f953a51c69958f21f6f30..7920bef8618b3db8a9774549abc6f054d24ef1b0 100644 --- a/templates/galaxy_nginx.conf.j2 +++ b/templates/galaxy_nginx.conf.j2 @@ -1,4 +1,3 @@ -#jinja2: lstrip_blocks: “Trueâ€, trim_blocks: "True" uwsgi_param QUERY_STRING $query_string; uwsgi_param REQUEST_METHOD $request_method; uwsgi_param CONTENT_TYPE $content_type; diff --git a/templates/gspecies_compose_template.yml.j2 b/templates/gspecies_compose_template.yml.j2 index 93f92fedfc2c55b7f213a6a833634eff08d6a74e..d897fa2d99d52a30ca9d2dd20db081612b80900f 100644 --- a/templates/gspecies_compose_template.yml.j2 +++ b/templates/gspecies_compose_template.yml.j2 @@ -1,4 +1,3 @@ -#jinja2: lstrip_blocks: “Trueâ€, trim_blocks: "True" # ./docker_data is created and filled with persistent data that should be backuped version: '3.7' services: diff --git a/templates/traefik_compose_template.yml.j2 b/templates/traefik_compose_template.yml.j2 index 5a70edfb26eb2c9166f865bab9036e0c81475244..6157cc2acb31627e05c6b9105370980ea5b6ab3d 100644 --- a/templates/traefik_compose_template.yml.j2 +++ b/templates/traefik_compose_template.yml.j2 @@ -1,4 +1,3 @@ -#jinja2: lstrip_blocks: “Trueâ€, trim_blocks: "True" version: '3.7' services: traefik: