Merge branch 'master' of https://github.com/hacdias/filemanager
Former-commit-id: b1b0de09da7b47528a692adad39cd667a3da1d2f [formerly f3bf194faaf969fec1dab7cffcaa575e95e08e51] [formerly 16a66d90f3e0f913ea118bd9ac70272fee336900 [formerly 05b7b8aa0b
]]
Former-commit-id: 733fd18a03d6919e6c895cf75c1ace68a4ae9314 [formerly bd425bdbf3c6f63b31618f472581ef1e31d1eca9]
Former-commit-id: bc3fc22aa86fb253b0106bacad73accfbc291081
pull/726/head
commit
242b868a56
54
README.md
54
README.md
|
@ -79,7 +79,57 @@ Otherwise, you may not want to use a configuration file, which can be done using
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
(TODO)
|
File Manager is also on [Docker Hub](https://hub.docker.com/r/hacdias/filemanager/) so you can just `docker pull hacdias/filemanager`.
|
||||||
|
|
||||||
|
|
||||||
|
### Paths in the container
|
||||||
|
|
||||||
|
- Config: `/etc/config.json`
|
||||||
|
- Database: `/etc/database.db`
|
||||||
|
- Base scope: `/srv`
|
||||||
|
|
||||||
|
### Default config.json
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"port": 80,
|
||||||
|
"address": "",
|
||||||
|
"database": "/etc/database.db",
|
||||||
|
"scope": "/srv",
|
||||||
|
"allowCommands": true,
|
||||||
|
"allowEdit": true,
|
||||||
|
"allowNew": true,
|
||||||
|
"commands": []
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
If the user wants to use the `config.json` file:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker run \
|
||||||
|
-v /path/to/sites/root:/srv \
|
||||||
|
-v /path/to/config.json:/etc/config.json \
|
||||||
|
-v /path/to/database.db:/etc/database.db \
|
||||||
|
-p 80:80 \
|
||||||
|
hacdias/filemanager
|
||||||
|
```
|
||||||
|
|
||||||
|
If the user doesn't use the `config.json` file:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker run \
|
||||||
|
-v /path/to/sites/root:/srv \
|
||||||
|
-v /path/to/database.db:/etc/database.db \
|
||||||
|
-p 80:80 \
|
||||||
|
hacdias/filemanager
|
||||||
|
--port 80
|
||||||
|
--database /etc/database.db
|
||||||
|
--scope /srv
|
||||||
|
--other-flag other-value
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
|
||||||
|
@ -140,7 +190,7 @@ If you want to contribute or want to build the code from source, you will need t
|
||||||
5. `go install gihthub.com/hacdias/filemanager/cmd/filemanager`
|
5. `go install gihthub.com/hacdias/filemanager/cmd/filemanager`
|
||||||
6. Execute `$GOPATH/bin/filemanager`
|
6. Execute `$GOPATH/bin/filemanager`
|
||||||
|
|
||||||
The steps 3 and 4 are only required **if you want to develop the front-end**. Otherwise, you can ignore them. Before pulling, if you made any change on assets folder, you must run the `build.sh` script on the root of this repository.
|
The steps 3 and 4 are only required **if you want to develop the front-end**. Otherwise, you can ignore them. Before pulling, if you made any change on assets folder, you must run the `build.sh` script on the root of this repository. Also ensure that you have [go.rice](https://github.com/GeertJohan/go.rice) tool installed on your computer.
|
||||||
|
|
||||||
If you are using this as a Caddy plugin, you should use its [official instructions for plugins](https://github.com/mholt/caddy/wiki/Extending-Caddy#2-plug-in-your-plugin) and import `github.com/hacdias/filemanager/caddy/filemanager`.
|
If you are using this as a Caddy plugin, you should use its [official instructions for plugins](https://github.com/mholt/caddy/wiki/Extending-Caddy#2-plug-in-your-plugin) and import `github.com/hacdias/filemanager/caddy/filemanager`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue