standard-build/scripts/grav/main.py

11 lines
406 B
Python
Raw Normal View History

2022-09-22 19:41:01 +01:00
import os, sys
with open("../nginx-site-template.conf", "r") as f:
2022-09-22 19:54:04 +01:00
template = f.read().replace("#serverNameVar", f"{sys.argv[1]}").replace("#http://127.0.0.1:8080/", f"http://172.30.2.1:80/")
2022-09-22 19:41:01 +01:00
with open("/etc/nginx/sites-available/grav.conf", "w") as f:
f.write(template)
# depreceated, TODO: replace with os.subprocess
2022-09-22 19:53:03 +01:00
os.system("sh ../nginx-ensite.sh grav")
2022-09-22 19:41:01 +01:00
os.system("sh launch-docker.sh")