commit
a8795cba61
|
@ -10,7 +10,9 @@ RUN chmod +x /healthcheck.sh # Make the script executable
|
||||||
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
|
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
|
||||||
CMD /healthcheck.sh || exit 1
|
CMD /healthcheck.sh || exit 1
|
||||||
|
|
||||||
VOLUME /srv
|
RUN mkdir -p /Certs
|
||||||
|
|
||||||
|
VOLUME /srv /Certs
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
COPY docker_config.json /.filebrowser.json
|
COPY docker_config.json /.filebrowser.json
|
||||||
|
|
28
README.md
28
README.md
|
@ -37,3 +37,31 @@ For installation instructions please refer to our docs at [https://filebrowser.o
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
If you're interested in contributing to this project, our docs are best places to start [https://filebrowser.org/contributing](https://filebrowser.org/contributing).
|
If you're interested in contributing to this project, our docs are best places to start [https://filebrowser.org/contributing](https://filebrowser.org/contributing).
|
||||||
|
|
||||||
|
## Help for SSL Docker
|
||||||
|
|
||||||
|
To use SSL in Docker you must make this volumes configuration like this table
|
||||||
|
|
||||||
|
| Host/volume | Path in container | Description |
|
||||||
|
| :------------- | :------- | :-------------------------------- |
|
||||||
|
| `/home/devops/configFilebrowser/filebrowser.db` | `/filebrowser.db` | **Required**. for Database |
|
||||||
|
| `/home/devops/configFilebrowser/filebrowser.json` | `/filebrowser.json` | **Required**. for Configuration file (*) |
|
||||||
|
| `/home/devops/exemple.com` | `/Certs` | **Required**. for Certs |
|
||||||
|
| `/portainer/Downloads` | `/srv` | **Required**. Folder to be shared |
|
||||||
|
|
||||||
|
|
||||||
|
(*) and make the configuration in json file like this
|
||||||
|
|
||||||
|
```http
|
||||||
|
|
||||||
|
{
|
||||||
|
"port": 8080, //the same port as your host container
|
||||||
|
"baseURL": "",
|
||||||
|
"address": "exemple.com",
|
||||||
|
"log": "stdout",
|
||||||
|
"database": "/filebrowser.db",
|
||||||
|
"root": "/srv",
|
||||||
|
"cert": "/Certs/fullchain.pem",
|
||||||
|
"key": "/Certs/privkey.pem"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
"baseURL": "",
|
"baseURL": "",
|
||||||
"address": "",
|
"address": "",
|
||||||
"log": "stdout",
|
"log": "stdout",
|
||||||
"database": "/database.db",
|
"database": "/filebrowser.db",
|
||||||
"root": "/srv"
|
"root": "/srv",
|
||||||
|
"cert": "/Certs/fullchain.pem",
|
||||||
|
"key": "/Certs/privkey.pem"
|
||||||
}
|
}
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
PORT=${FB_PORT:-$(jq -r .port /.filebrowser.json)}
|
PORT=${FB_PORT:-$(jq -r .port filebrowser.json)}
|
||||||
ADDRESS=${FB_ADDRESS:-$(jq -r .address /.filebrowser.json)}
|
ADDRESS=${FB_ADDRESS:-$(jq -r .address filebrowser.json)}
|
||||||
ADDRESS=${ADDRESS:-localhost}
|
ADDRESS=${ADDRESS:-localhost}
|
||||||
curl -f http://$ADDRESS:$PORT/health || exit 1
|
VAR=$(jq -r .cert filebrowser.json)
|
||||||
|
if [ -z "${VAR}" ]; then
|
||||||
|
curl -f http://$ADDRESS:$PORT/health || exit 1
|
||||||
|
else
|
||||||
|
curl -f https://$ADDRESS:$PORT/health || exit 1
|
||||||
|
fi
|
Loading…
Reference in New Issue