Added filebrowser

This commit is contained in:
root
2025-05-24 22:41:32 +00:00
parent 4ecfe2b152
commit 114d8c461b
7 changed files with 120 additions and 0 deletions

0
filebrowser/addusers.txt Executable file
View File

View File

@@ -0,0 +1,17 @@
version: '3'
services:
filebrowser:
image: filebrowser/filebrowser:latest
container_name: filebrowser
entrypoint: ./start.sh
volumes:
- /data:/srv #Change to match your directory
- /selfhosting/apps/smb_utilities/filebrowser/filebrowser.db:/database/filebrowser.db #Change to match your directory
- /selfhosting/apps/smb_utilities/filebrowser/settings.json:/config/settings.json #Change to match your directory
- /selfhosting/apps/smb_utilities/filebrowser/start.sh:/start.sh
- /selfhosting/apps/smb_utilities/filebrowser/addusers.txt:/addusers.txt
environment:
- PUID=$(id -u)
- PGID=$(id -g)
ports:
- 8095:80 #Change the port if needed

View File

View File

@@ -0,0 +1,8 @@
{
"port": 80,
"baseURL": "",
"address": "",
"log": "stdout",
"database": "/database/filebrowser.db",
"root": "/srv"
}

18
filebrowser/start.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
./filebrowser config init
echo "Adding users"
./filebrowser users add admin admin
./filebrowser users update admin --perm.admin
./addusers.sh
echo -n > addusers.sh
input_file="addusers.txt"
while IFS=: read -r username password
do
./filebrowser users add $username $password
./filebrowser users update $username --scope /$username
done < "$input_file"
echo -n > $input_file
./filebrowser