From 7f46ef9a972c79a10569f124bd74b371a391e862 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Fri, 28 Jul 2017 11:01:48 +0100 Subject: [PATCH 1/2] Add go rice notice Former-commit-id: 1cf9a6f790a167f00e35090d78b3ce6d96d2eb1b [formerly b85aabf46fd0582b8f4004f7be97cd33fa97e0cb] [formerly c28c70f3279ad7231eb8449ffac451d91773eaa6 [formerly 775d06bda7831cfcde2a4fa3b23d5f2bc0556efb]] Former-commit-id: 67e1adb78c8361ac89e88b3a4706ead16394be8c [formerly d683d4465cd25c5cd03dde2b117f6591a6d5a3f6] Former-commit-id: b48c0ea8454366294e0209dbb636ee18f4720767 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a17db82..b7cdced3 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,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` 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`. From 3cee6b67f0680a57e2bd23d8e5db7eba8ab3f389 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Fri, 28 Jul 2017 11:04:31 +0100 Subject: [PATCH 2/2] Add Docker Former-commit-id: dcb37f7c8649e689e93a5cbec639245cb66e3b05 [formerly 4a0678e53f804e2898df22b95cb2b192a5e481b8] [formerly 4435baab269f8142b49fdbc75c437fc14cc67839 [formerly aaa254689f2b340bedaff8f9a8dfcb0924ead6b2]] Former-commit-id: ce01f9194f26cdfd3b68edf5a59da33a4b9f2d37 [formerly 67c11145731e1171f1ab30ab3a632498dcb73594] Former-commit-id: a2549d020b96c251bf002f30530df8f25cf03609 --- README.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b7cdced3..3bed2749 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,57 @@ Otherwise, you may not want to use a configuration file, which can be done using ## 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