|
|
@ -7,6 +7,7 @@ import socket
|
|
|
|
convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ))
|
|
|
|
convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ))
|
|
|
|
|
|
|
|
|
|
|
|
# Actual startup script
|
|
|
|
# Actual startup script
|
|
|
|
os.environ["ADMIN_ADDRESS"] = socket.gethostbyname("admin")
|
|
|
|
if "ADMIN_ADDRESS" not in os.environ:
|
|
|
|
|
|
|
|
os.environ["ADMIN_ADDRESS"] = socket.gethostbyname("admin")
|
|
|
|
convert("/conf/nginx.conf", "/etc/nginx/nginx.conf")
|
|
|
|
convert("/conf/nginx.conf", "/etc/nginx/nginx.conf")
|
|
|
|
os.execv("/usr/sbin/nginx", ["nginx", "-g", "daemon off;"])
|
|
|
|
os.execv("/usr/sbin/nginx", ["nginx", "-g", "daemon off;"])
|
|
|
|