Skip to content
Snippets Groups Projects
Commit 483924aa authored by Arthur Le Bars's avatar Arthur Le Bars
Browse files

removed obsolete code, jinja2 templating options in script

parent f579a28a
No related branches found
No related tags found
2 merge requests!3release 1.0.1,!2Corrections cloud
......@@ -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
......
#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;
......
#jinja2: lstrip_blocks: “True”, trim_blocks: "True"
# ./docker_data is created and filled with persistent data that should be backuped
version: '3.7'
services:
......
#jinja2: lstrip_blocks: “True”, trim_blocks: "True"
version: '3.7'
services:
traefik:
......
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