There was an error while loading. Please reload this page.
1 parent cfda410 commit 2617f8fCopy full SHA for 2617f8f
1 file changed
{{cookiecutter.project_folder_name}}/poetry_scripts.py
@@ -74,7 +74,10 @@ def run_host():
74
# build and run docker image
75
image_tag = "{{ cookiecutter.project_slug }}:local_test"
76
run_cmd(f"docker build -t {image_tag} .")
77
- ngrok_token = os.getenv("NGROK_AUTHTOKEN")
78
- if not ngrok_token:
+ if not (ngrok_token := os.getenv("NGROK_AUTHTOKEN")):
79
raise ValueError("Missing NGROK api key")
80
- run_cmd(f"docker run --rm -e BDK_SERVER_MODE=book -e BDK_TRANSPORT_MODE=ngrok -e NGROK_AUTHTOKEN={ngrok_token} {image_tag}")
+ cmd = f"docker run --rm -e BDK_SERVER_MODE=book -e BDK_TRANSPORT_MODE=ngrok -e NGROK_AUTHTOKEN={ngrok_token}"
+ if ngrok_domain := os.getenv("BDK_NGROK_DOMAIN"):
81
+ cmd += f" -e BDK_NGROK_DOMAIN={ngrok_domain}"
82
+ cmd += f" {image_tag}"
83
+ run_cmd(cmd)
0 commit comments