1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-11-25 22:12:28 +02:00

Add various environment variables to allow running outside of docker-compose

This commit is contained in:
Mildred Ki'Lya
2018-01-31 22:24:54 +01:00
parent d4cc142f64
commit ae8c9f5a6b
10 changed files with 46 additions and 17 deletions

View File

@@ -8,7 +8,8 @@ import glob
convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ))
# Actual startup script
os.environ["FRONT_ADDRESS"] = socket.gethostbyname("front")
os.environ["FRONT_ADDRESS"] = socket.gethostbyname(os.environ.get("FRONT_ADDRESS", "front"))
if "HOST_REDIS" not in os.environ: os.environ["HOST_REDIS"] = "redis"
for rspamd_file in glob.glob("/conf/*"):
convert(rspamd_file, os.path.join("/etc/rspamd/local.d", os.path.basename(rspamd_file)))