Use an HTTP proxy for resolving the admin address dynamically
This commit is contained in:
@@ -2,15 +2,11 @@
|
||||
|
||||
import jinja2
|
||||
import os
|
||||
import socket
|
||||
|
||||
convert = lambda src, dst, args: open(dst, "w").write(jinja2.Template(open(src).read()).render(**args))
|
||||
|
||||
args = os.environ.copy()
|
||||
|
||||
if "ADMIN_ADDRESS" not in os.environ:
|
||||
args["ADMIN_ADDRESS"] = socket.gethostbyname("admin")
|
||||
|
||||
args["TLS"] = {
|
||||
"cert": ("/certs/cert.pem", "/certs/key.pem"),
|
||||
"letsencrypt": ("/certs/letsencrypt/live/mailu/fullchain.pem",
|
||||
|
||||
Reference in New Issue
Block a user