From 598ad4fc7ad296eef65d038aa01db8f2ef09ba7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20M=C3=B6hlmann?= Date: Sun, 30 Dec 2018 20:52:34 +0200 Subject: [PATCH] Prefix static path with version for Traefik --- setup/server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/server.py b/setup/server.py index 2b27cb3b..3c950b0a 100644 --- a/setup/server.py +++ b/setup/server.py @@ -10,7 +10,9 @@ import random import ipaddress -app = flask.Flask(__name__) +version = os.getenv("this_version") +static_url_path = "/" + version + "/static" +app = flask.Flask(__name__,static_url_path=static_url_path) flask_bootstrap.Bootstrap(app) db = redis.StrictRedis(host='redis', port=6379, db=0) @@ -40,8 +42,6 @@ def build_app(path): def app_context(): return dict(versions=os.getenv("VERSIONS","master").split(',')) - version = os.getenv("this_version") - prefix_bp = flask.Blueprint(version, __name__) prefix_bp.jinja_loader = jinja2.ChoiceLoader([ jinja2.FileSystemLoader(os.path.join(path, "templates")),