Add --allowed-hosts all to code-server launch to fix WS 1006
This commit is contained in:
parent
f1e71b66eb
commit
94f929f4d7
@ -3,9 +3,9 @@ set -euo pipefail
|
||||
|
||||
echo "[code-server] starting install"
|
||||
|
||||
# --------------------------------------------------
|
||||
# ----------------------------------------------------------
|
||||
# Config
|
||||
# --------------------------------------------------
|
||||
# ----------------------------------------------------------
|
||||
SERVICE_ROOT="/opt/zlh/services/code-server"
|
||||
ZLH_ARTIFACT_BASE_URL="${ZLH_ARTIFACT_BASE_URL:-http://10.60.0.251:8080}"
|
||||
ARTIFACT_NAME="${ZLH_CODESERVER_ARTIFACT:-code-server.tar.gz}"
|
||||
@ -78,9 +78,9 @@ validate_artifact_shape() {
|
||||
fi
|
||||
}
|
||||
|
||||
# --------------------------------------------------
|
||||
# ----------------------------------------------------------
|
||||
# Idempotency
|
||||
# --------------------------------------------------
|
||||
# ----------------------------------------------------------
|
||||
if [ ! -x "${BIN}" ]; then
|
||||
echo "[code-server] action=artifact_install target=${SERVICE_ROOT} status=begin"
|
||||
download_artifact
|
||||
@ -98,9 +98,9 @@ if [ -f "${PID_FILE}" ] && kill -0 "$(cat "${PID_FILE}")" 2>/dev/null; then
|
||||
echo "[code-server] already running"
|
||||
else
|
||||
rm -f "${PID_FILE}"
|
||||
echo "[code-server] action=service_launch command=\"${BIN} --bind-addr 0.0.0.0:${PORT} --auth none --disable-telemetry ${WORKSPACE_DIR}\""
|
||||
echo "[code-server] action=service_launch command=\"${BIN} --bind-addr 0.0.0.0:${PORT} --auth none --disable-telemetry --allowed-hosts all ${WORKSPACE_DIR}\""
|
||||
HOME="/home/dev" USER="dev" LOGNAME="dev" \
|
||||
nohup "${BIN}" --bind-addr "0.0.0.0:${PORT}" --auth none --disable-telemetry "${WORKSPACE_DIR}" >"${LOG_FILE}" 2>&1 &
|
||||
nohup "${BIN}" --bind-addr "0.0.0.0:${PORT}" --auth none --disable-telemetry --allowed-hosts all "${WORKSPACE_DIR}" >"${LOG_FILE}" 2>&1 &
|
||||
echo $! > "${PID_FILE}"
|
||||
fi
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user