From fb3e468beb9400d455acacd5eeb7300bd6bd91e4 Mon Sep 17 00:00:00 2001 From: Steven Briscoe Date: Wed, 28 Sep 2022 12:11:29 +0200 Subject: [PATCH] App Submission: File Browser (#169) Co-authored-by: Steven Briscoe Co-authored-by: Mayank Chhabra --- file-browser/data/filebrowser.db | 0 file-browser/docker-compose.yml | 20 ++++++++++++++++++++ file-browser/exports.sh | 22 ++++++++++++++++++++++ file-browser/umbrel-app.yml | 24 ++++++++++++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 file-browser/data/filebrowser.db create mode 100644 file-browser/docker-compose.yml create mode 100644 file-browser/exports.sh create mode 100644 file-browser/umbrel-app.yml diff --git a/file-browser/data/filebrowser.db b/file-browser/data/filebrowser.db new file mode 100644 index 0000000..e69de29 diff --git a/file-browser/docker-compose.yml b/file-browser/docker-compose.yml new file mode 100644 index 0000000..058350a --- /dev/null +++ b/file-browser/docker-compose.yml @@ -0,0 +1,20 @@ +version: "3.7" + +services: + app_proxy: + environment: + APP_HOST: file-browser_server_1 + APP_PORT: 80 + + server: + image: filebrowser/filebrowser:v2.22.4@sha256:8a30269612a3bc8453ab29641c3e3d7ad141a8d142efc2cd78196281b1035537 + user: "1000:1000" + restart: on-failure + volumes: + - ${APP_DATA_DIR}/data/filebrowser.db:/database/filebrowser.db + - ${UMBREL_ROOT}/data/storage:/data + environment: + - FB_PORT=80 + - FB_DATABASE=/database/filebrowser.db + - FB_ROOT=/data + - FB_NOAUTH=true diff --git a/file-browser/exports.sh b/file-browser/exports.sh new file mode 100644 index 0000000..20d1bea --- /dev/null +++ b/file-browser/exports.sh @@ -0,0 +1,22 @@ +UMBREL_DATA_DIR="${UMBREL_ROOT}/data" +UMBREL_DATA_STORAGE_DIR="${UMBREL_DATA_DIR}/storage" +DESIRED_OWNER="1000:1000" + +if [[ ! -d "${UMBREL_DATA_STORAGE_DIR}" ]]; then + mkdir -p "${UMBREL_DATA_STORAGE_DIR}" +fi + +filebrowser_correct_permission() { + local -r path="${1}" + + if [[ -d "${path}" ]]; then + owner=$(stat -c "%u:%g" "${path}") + + if [[ "${owner}" != "${DESIRED_OWNER}" ]]; then + chown "${DESIRED_OWNER}" "${path}" + fi + fi +} + +filebrowser_correct_permission "${UMBREL_DATA_DIR}" +filebrowser_correct_permission "${UMBREL_DATA_STORAGE_DIR}" \ No newline at end of file diff --git a/file-browser/umbrel-app.yml b/file-browser/umbrel-app.yml new file mode 100644 index 0000000..1e7415d --- /dev/null +++ b/file-browser/umbrel-app.yml @@ -0,0 +1,24 @@ +manifestVersion: 1 +id: file-browser +category: Files +name: File Browser +version: "2.22.4" +tagline: Browse and manage the files you download on your Umbrel +description: >- + File Browser lets you upload, delete, preview, rename and edit your folders and files. + + + Easily manage files in the Umbrel's storage folder where your downloads from apps like Transmission, Sonarr, Radarr, and Lidarr are currently held. +developer: File Browser +website: https://filebrowser.org/ +dependencies: [] +repo: https://github.com/filebrowser/filebrowser +support: https://github.com/filebrowser/filebrowser/issues +port: 7421 +gallery: + - 1.jpg + - 2.jpg + - 3.jpg +path: "/files/" +deterministicPassword: false +torOnly: false \ No newline at end of file