8000 feat(filebrowser): support subdomain = false by Seppdo · Pull Request #286 · coder/modules · GitHub
[go: up one dir, main page]

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

feat(filebrowser): support subdomain = false #286

Merged
merged 21 commits into from
Sep 19, 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
assemble base path inside terraform
  • Loading branch information
Seppdo authored Aug 30, 2024
commit 71624cff0fa6b976da9e809b9441e6939637cbf7
7 changes: 3 additions & 4 deletions filebrowser/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ resource "coder_script" "filebrowser" {
FOLDER : var.folder,
LOG_PATH : var.log_path,
DB_PATH : var.database_path,
WORKSPACE_NAME : data.coder_workspace.me.name,
OWNER_NAME : data.coder_workspace_owner.me.name,
AGENT_NAME : var.agent_name
SUBDOMAIN : var.subdomain
SUBDOMAIN : var.subdomain,
SERVER_BASE_PATH : format("/@%s/%s.%s/apps/vscode-web/",
data.coder_workspace_owner.me.name, data.coder_workspace.me.name, var.agent_name),
})
run_on_start = true
}
Expand Down
2 changes: 1 addition & 1 deletion filebrowser/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi

# set baseurl if subdomain = false
if [ "${SUBDOMAIN}" == "false" ]; then
filebrowser config set --baseurl "/@${OWNER_NAME}/${WORKSPACE_NAME}.${RESOURCE_NAME}/apps/filebrowser" > ${LOG_PATH} 2>&1
filebrowser config set --baseurl "${SERVER_BASE_PATH}" > ${LOG_PATH} 2>&1
else
filebrowser config set --baseurl "" > ${LOG_PATH} 2>&1
fi
Expand Down
0