File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414"""
1515
1616import argparse
17- import os
1817import subprocess
1918import sys
2019from pathlib import Path
@@ -44,10 +43,6 @@ def run_app():
4443 )
4544 args = parser .parse_args ()
4645
47- # Read URL prefix from environment (set by Docker Compose VIRTUAL_PATH)
48- # This is needed when the dashboard is served from a subpath (e.g., /2021community)
49- virtual_path = os .environ .get ("VIRTUAL_PATH" , "" ).strip ()
50-
5146 # Get the directory containing app.py (same directory as scripts.py)
5247 script_dir = Path (__file__ ).parent
5348 app_path = script_dir / "app.py"
@@ -77,15 +72,6 @@ def run_app():
7772 cmd .append ("--show" )
7873 print ("Starting HMC Survey Dashboard in DEVELOPMENT mode..." )
7974
80- # Add URL prefix if VIRTUAL_PATH is set (for serving from subpath)
81- # This tells Panel to prepend the path to all generated URLs (static files, WebSockets, etc.)
82- # With --index flag, the app is served at the root of the prefix (not /app)
83- if virtual_path :
84- cmd .extend (["--prefix" , virtual_path ])
85- print (f"Using URL prefix: { virtual_path } " )
86- if args .production :
87- print (f"Dashboard will be accessible at: http://{ args .host } :{ args .port } { virtual_path } /" )
88-
8975 print (f"Running: { ' ' .join (cmd )} " )
9076
9177 try :
You can’t perform that action at this time.
0 commit comments