This commit is contained in:
2025-07-30 23:24:59 -04:00
parent a047d23eec
commit d52749f94d

View File

@@ -3,16 +3,15 @@ from textwrap import dedent
from deploy import by_branch from deploy import by_branch
def build_caddyfile(): excluded = {"deployer"}
excluded = {"deployer"} with open("Caddyfile", "w+") as file:
with open("Caddyfile", "w+") as file: for domain, port in map(itemgetter("domain", "port"), by_branch.values()):
for domain, port in map(itemgetter("domain", "port"), by_branch.values()): if domain in excluded:
if domain in excluded: continue
continue print(f"adding {domain} -> {port} to Caddyfile")
print(f"adding {domain} -> {port} to Caddyfile") entry = f"""
entry = f""" {domain}.drm.dev {{
{domain}.drm.dev {{ reverse_proxy localhost:{port}
reverse_proxy localhost:{port} }}
}} """
""" file.write(dedent(entry))
file.write(dedent(entry))