8000 feat(vscode-web): support hosting on a subpath with `subdomain=false` by Emyrk · Pull Request #288 · coder/modules · GitHub
[go: up one dir, main page]

Skip to content
8000
This repository was archived by the owner on May 15, 2025. It is now read-only.

feat(vscode-web): support hosting on a subpath with subdomain=false #288

Merged
merged 18 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
do not use the same var name for env var
  • Loading branch information
Emyrk committed Aug 29, 2024
commit 129d69258d7f03f4a06a2ecefdcb3a8183a19f18
2 changes: 1 addition & 1 deletion code-server/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ resource "coder_script" "code-server" {
AUTO_INSTALL_EXTENSIONS : var.auto_install_extensions,
# SERVER_BASE_PATH : "/",
SERVER_BASE_PATH : format("/%s/%s.%s/apps/vscode-web/",
data.coder_workspace_owner.name, data.coder_workspace.name, "main"),
data.coder_workspace_owner.name, data.coder_workspace.name, var.agent_id),
})
run_on_start = true

Expand Down
8 changes: 4 additions & 4 deletions vscode-web/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ if [ -n "${EXTENSIONS_DIR}" ]; then
fi

# Set extension directory
SERVER_BASE_PATH=""
SERVER_BASE_PATH_ARG=""
if [ -n "${SERVER_BASE_PATH}" ]; then
SERVER_BASE_PATH="--server-base-path=${SERVER_BASE_PATH}"
SERVER_BASE_PATH_ARG="--server-base-path=${SERVER_BASE_PATH}"
fi

run_vscode_web() {
echo "👷 Running $VSCODE_WEB serve-local $EXTENSION_ARG $SERVER_BASE_PATH --port ${PORT} --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..."
echo "👷 Running $VSCODE_WEB serve-local $EXTENSION_ARG $SERVER_BASE_PATH_ARG --port ${PORT} --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..."
echo "Check logs at ${LOG_PATH}!"
"$VSCODE_WEB" serve-local "$EXTENSION_ARG" "$SERVER_BASE_PATH" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 &
"$VSCODE_WEB" serve-local "$EXTENSION_ARG" "$SERVER_BASE_PATH_ARG" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 &
}

# Check if the settings file exists...
Expand Down
Loading
0