fixed sh ref
This commit is contained in:
14
filebrowser/main.test.ts
Normal file
14
filebrowser/main.test.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { describe, expect, it } from "bun:test";
|
||||||
|
import {
|
||||||
|
executeScriptInContainer,
|
||||||
|
runTerraformApply,
|
||||||
|
runTerraformInit,
|
||||||
|
testRequiredVariables,
|
||||||
|
} from "../test";
|
||||||
|
|
||||||
|
describe("azure-region", async () => {
|
||||||
|
await runTerraformInit(import.meta.dir);
|
||||||
|
|
||||||
|
testRequiredVariables(import.meta.dir, {});
|
||||||
|
|
||||||
|
});
|
||||||
@@ -9,7 +9,6 @@ terraform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add required variables for your modules and remove any unneeded variables
|
|
||||||
variable "agent_id" {
|
variable "agent_id" {
|
||||||
type = string
|
type = string
|
||||||
description = "The ID of a Coder agent."
|
description = "The ID of a Coder agent."
|
||||||
@@ -20,7 +19,7 @@ variable "database_path" {
|
|||||||
description = "The path to the filebrowser database."
|
description = "The path to the filebrowser database."
|
||||||
default = "filebrowser.db"
|
default = "filebrowser.db"
|
||||||
validation {
|
validation {
|
||||||
# condition = endswith(var.database_path, "filebrowser.db")
|
# Ensures path leads to */filebrowser.db
|
||||||
condition = can(regex(".*filebrowser\\.db$", var.database_path))
|
condition = can(regex(".*filebrowser\\.db$", var.database_path))
|
||||||
error_message = "The database_path must end with 'filebrowser.db'."
|
error_message = "The database_path must end with 'filebrowser.db'."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,8 @@ printf "👷 Starting filebrowser in background... \n\n"
|
|||||||
ROOT_DIR=${FOLDER}
|
ROOT_DIR=${FOLDER}
|
||||||
ROOT_DIR=$${ROOT_DIR/\~/$HOME}
|
ROOT_DIR=$${ROOT_DIR/\~/$HOME}
|
||||||
|
|
||||||
# Set the database flag if DB_PATH is set
|
|
||||||
DB_FLAG=""
|
DB_FLAG=""
|
||||||
if [ "${DB_PATH}" != "filebrowser.db" ]; then
|
if [ "${DB_PATH}" != "filebrowser.db" ]; then
|
||||||
echo ">>> flag set!"
|
|
||||||
DB_FLAG="-d ${DB_PATH}"
|
DB_FLAG="-d ${DB_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -23,6 +21,6 @@ printf "📂 Serving $${ROOT_DIR} at http://localhost:${PORT} \n\n"
|
|||||||
|
|
||||||
printf "Running 'filebrowser --noauth --root $ROOT_DIR --port ${PORT}$${DB_FLAG}' \n\n" # -d ${DB_PATH}
|
printf "Running 'filebrowser --noauth --root $ROOT_DIR --port ${PORT}$${DB_FLAG}' \n\n" # -d ${DB_PATH}
|
||||||
|
|
||||||
filebrowser --noauth --root $ROOT_DIR --port ${PORT}${DB_FLAG} >${LOG_PATH} 2>&1 & # -d ${DB_PATH}
|
filebrowser --noauth --root $ROOT_DIR --port ${PORT}$${DB_FLAG} >${LOG_PATH} 2>&1 & # -d ${DB_PATH}
|
||||||
|
|
||||||
printf "📝 Logs at ${LOG_PATH} \n\n"
|
printf "📝 Logs at ${LOG_PATH} \n\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user