mirror of
https://github.com/retspen/webvirtcloud
synced 2026-10-18 00:50:07 +00:00
fix(console): fix novncd startup in container and prevent double slashes in websocket url
This commit is contained in:
parent
f061189716
commit
d9112b797f
7 changed files with 64 additions and 15 deletions
|
|
@ -20,6 +20,17 @@ if [ -z "$SECRET_KEY" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Apply optional WebSocket configuration from environment
|
||||
if [ -n "$WS_PUBLIC_PORT" ]; then
|
||||
sed -i "s|^WS_PUBLIC_PORT = .*|WS_PUBLIC_PORT = $WS_PUBLIC_PORT|" "$APP_DIR/webvirtcloud/settings.py"
|
||||
fi
|
||||
if [ -n "$WS_PUBLIC_HOST" ]; then
|
||||
sed -i "s|^WS_PUBLIC_HOST = .*|WS_PUBLIC_HOST = \"$WS_PUBLIC_HOST\"|" "$APP_DIR/webvirtcloud/settings.py"
|
||||
fi
|
||||
if [ -n "$WS_PUBLIC_PATH" ]; then
|
||||
sed -i "s|^WS_PUBLIC_PATH = .*|WS_PUBLIC_PATH = \"$WS_PUBLIC_PATH\"|" "$APP_DIR/webvirtcloud/settings.py"
|
||||
fi
|
||||
|
||||
# Persist SQLite database in DATA_DIR
|
||||
if [ ! -f "$DATA_DIR/db.sqlite3" ] && [ -f "$APP_DIR/db.sqlite3" ] && [ ! -L "$APP_DIR/db.sqlite3" ]; then
|
||||
mv "$APP_DIR/db.sqlite3" "$DATA_DIR/db.sqlite3"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue