Added filebrowser
This commit is contained in:
0
filebrowser/addusers.txt
Executable file
0
filebrowser/addusers.txt
Executable file
17
filebrowser/docker-compose.yaml
Normal file
17
filebrowser/docker-compose.yaml
Normal 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
|
||||
0
filebrowser/filebrowser.db
Normal file
0
filebrowser/filebrowser.db
Normal file
8
filebrowser/settings.json
Normal file
8
filebrowser/settings.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"port": 80,
|
||||
"baseURL": "",
|
||||
"address": "",
|
||||
"log": "stdout",
|
||||
"database": "/database/filebrowser.db",
|
||||
"root": "/srv"
|
||||
}
|
||||
18
filebrowser/start.sh
Executable file
18
filebrowser/start.sh
Executable 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
|
||||
Reference in New Issue
Block a user