Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(filebrowser): support custom base_url in case of custom db path #320

Merged
merged 6 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions filebrowser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A file browser for your workspace.
```tf
module "filebrowser" {
source = "registry.coder.com/modules/filebrowser/coder"
version = "1.0.19"
version = "1.0.22"
agent_id = coder_agent.example.id
}
```
Expand All @@ -28,7 +28,7 @@ module "filebrowser" {
```tf
module "filebrowser" {
source = "registry.coder.com/modules/filebrowser/coder"
version = "1.0.19"
version = "1.0.22"
agent_id = coder_agent.example.id
folder = "/home/coder/project"
}
Expand All @@ -39,7 +39,7 @@ module "filebrowser" {
```tf
module "filebrowser" {
source = "registry.coder.com/modules/filebrowser/coder"
version = "1.0.19"
version = "1.0.22"
agent_id = coder_agent.example.id
database_path = ".config/filebrowser.db"
}
Expand Down
2 changes: 1 addition & 1 deletion filebrowser/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ "${DB_PATH}" != "filebrowser.db" ]; then
fi

# set baseurl to be able to run if sudomain=false; if subdomain=true the SERVER_BASE_PATH value will be ""
filebrowser config set --baseurl "${SERVER_BASE_PATH}" > ${LOG_PATH} 2>&1
filebrowser config set --baseurl "${SERVER_BASE_PATH}"$${DB_FLAG} > ${LOG_PATH} 2>&1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yandolfat Why is this required here if we specify DB_FLAG while running filebrowser in line 27.?

I think we would need it only once either in config or while running.


printf "📂 Serving $${ROOT_DIR} at http://localhost:${PORT} \n\n"

Expand Down