filebrowser / docs

📄 Who doesn't like documentation?
58 stars 38 forks source link

[Docker] "No config file used" #53

Open mozai opened 1 year ago

mozai commented 1 year ago

Following the instructions at https://filebrowser.org/installation#docker , the container image seems to ignore/skip the /config/settings.json file.

Steps to reproduce:

mkdir -p $HOME/.filebrowser
touch $HOME/filebrowser.db
cat >$HOME/filebrowser/settings.json <<_EOT
{"address":"","baseURL":"","database":"/database/filebrowser.db","log":"stdout","port":80,"root":"/srv"}
_EOT
docker run -v $HOME/public:/srv \
    -v $HOME/.filebrowser/filebrowser.db:/database/filebrowser.db \
    -v $HOME/.filebrowser/settings.json:/config/settings.json \
    -e PUID=$(id -u) -e PGID=$(id -g) -p 8080:80 \
    filebrowser/filebrowser:s6

What I expected:

container starts, listens on port 80 internally but Docker exposes that as port 8080 on the host

What I saw:

The empty filebrowser.db was initialized, changing into a 64kB file so I know the container can access $HOME/.filebrowser, but:

[custom-init] No custom files found, skipping...
[ls.io-init] done.
2023/08/12 21:18:47 No config file used
2023/08/12 21:18:47 Listening on 127.0.0.1:8080

Since the console output says it's listening on port 8080 instead of 80, I tried restarting the container with -p 8080:8080 but then I get "connection reset by peer"