mirror of
https://github.com/Mailu/Mailu.git
synced 2025-05-21 22:33:16 +02:00
Prefix static path with version for Traefik
This commit is contained in:
parent
1b64c80612
commit
598ad4fc7a
@ -10,7 +10,9 @@ import random
|
|||||||
import ipaddress
|
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)
|
flask_bootstrap.Bootstrap(app)
|
||||||
db = redis.StrictRedis(host='redis', port=6379, db=0)
|
db = redis.StrictRedis(host='redis', port=6379, db=0)
|
||||||
|
|
||||||
@ -40,8 +42,6 @@ def build_app(path):
|
|||||||
def app_context():
|
def app_context():
|
||||||
return dict(versions=os.getenv("VERSIONS","master").split(','))
|
return dict(versions=os.getenv("VERSIONS","master").split(','))
|
||||||
|
|
||||||
version = os.getenv("this_version")
|
|
||||||
|
|
||||||
prefix_bp = flask.Blueprint(version, __name__)
|
prefix_bp = flask.Blueprint(version, __name__)
|
||||||
prefix_bp.jinja_loader = jinja2.ChoiceLoader([
|
prefix_bp.jinja_loader = jinja2.ChoiceLoader([
|
||||||
jinja2.FileSystemLoader(os.path.join(path, "templates")),
|
jinja2.FileSystemLoader(os.path.join(path, "templates")),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user