add filebrowser db path var
This commit is contained in:
@@ -15,6 +15,12 @@ variable "agent_id" {
|
||||
description = "The ID of a Coder agent."
|
||||
}
|
||||
|
||||
variable "db_path" {
|
||||
type = string
|
||||
description = "The path to the filebrowser database."
|
||||
default = "~/filebrowser.db"
|
||||
}
|
||||
|
||||
variable "log_path" {
|
||||
type = string
|
||||
description = "The path to log filebrowser to."
|
||||
@@ -42,6 +48,7 @@ resource "coder_script" "filebrowser" {
|
||||
PORT : var.port,
|
||||
FOLDER : var.folder,
|
||||
LOG_PATH : var.log_path,
|
||||
DB_PATH : var.db_path,
|
||||
})
|
||||
run_on_start = true
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ ROOT_DIR=$${ROOT_DIR/\~/$HOME}
|
||||
|
||||
printf "📂 Serving $${ROOT_DIR} at http://localhost:${PORT} \n\n"
|
||||
|
||||
printf "Running 'filebrowser --noauth --root $ROOT_DIR --port ${PORT}' \n\n"
|
||||
printf "Running 'filebrowser --noauth --root $ROOT_DIR --port ${PORT} -d ${DB_PATH}' \n\n"
|
||||
|
||||
filebrowser --noauth --root $ROOT_DIR --port ${PORT} >${LOG_PATH} 2>&1 &
|
||||
filebrowser --noauth --root $ROOT_DIR --port ${PORT} -d ${DB_PATH} >${LOG_PATH} 2>&1 &
|
||||
|
||||
printf "📝 Logs at ${LOG_PATH} \n\n"
|
||||
|
||||
Reference in New Issue
Block a user