Skip to content

Commit

Permalink
set up VHM
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed Nov 30, 2024
1 parent 3c474af commit adf3b9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
},

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "make install"
"postCreateCommand": "make install && .venv/bin/zconsole run instance/etc/zope.conf setup-codespace.py"
}
9 changes: 9 additions & 0 deletions setup-codespace.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import os
import transaction

CODESPACE_NAME = os.environ.get("CODESPACE_NAME", None)
if CODESPACE_NAME:
DOMAIN = os.environ["GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN"]
hostname = f"{CODESPACE_NAME}-8080.{DOMAIN}"
app.virtual_hosting.set_map(f"{hostname}/VirtualHostBase/https/{hostname}:443/VirtualHostRoot")
transaction.commit()

0 comments on commit adf3b9f

Please sign in to comment.