1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-10 10:04:01 +02:00

Add documentation for docker env vars

Also, move docker documentation further down to be less invasive
This commit is contained in:
Tuschl
2017-07-26 10:52:41 +02:00
parent 6e645aaced
commit eb7130063a

View File

@@ -27,23 +27,6 @@ The IFM uses the following resources:
## installation
Just copy the ifm.php to your webspace - thats all :)
## docker
The docker image is based on alpine 3.5 for a small image footprint, with necessary apache, php and supporting packages installed and exposes port 80.
### build image
Run the following command from the top source dir:
`docker build -t ifm .`
### run image
The script is installed inside the image at `/var/www/html/index.php`. Its default configuration is unchanged, thus it will display the contents of the document root (`/var/www/html`).
Here is an example of how to start up a container with this image:
`docker run --rm -i -p "9090:80" -v "/data:/var/www/html/data" ifm`
## key bindings
* <kbd>e</kbd> - edit / extract current file
* <kbd>h</kbd><kbd>j</kbd><kbd>k</kbd><kbd>l</kbd> - vim-style navigation (alternative to arrow keys)
@@ -76,6 +59,56 @@ The file should contain ONLY ONE LINE:
```
The password hash has to be a hash generated by PHPs `password_hash()` function. The default credentials are "admin:admin".
## docker
The docker image is based on alpine 3.5 for a small image footprint, with necessary apache, php and supporting packages installed and exposes port 80
### build image
Run the following command from the top source dir:
`docker build -t ifm .`
### run image
The script is installed inside the image at `/var/www/html/index.php`. Its default configuration is unchanged, thus it will display the contents of the document root (`/var/www/html`)
Here is an example of how to start up a container with this image:
`docker run --rm -it -e IFM_AUTH=1 -p "9090:80" -v "/data:/var/www/html/data" ifm`
The script's configuration can be changed by adjusting the corresponding docker environment variables
listed below:
| PHP config value | Docker env var |
| ------------------ | -------------------------- |
| `auth` | `IFM_AUTH` |
| `auth_source` | `IFM_AUTH_SOURCE` |
| `root_dir` | `IFM_ROOT_DIR` |
| `tmp_dir` | `IFM_TMP_DIR` |
| `defaulttimezone` | `IFM_DEFAULTTIMEZONE` |
| `ajaxrequest` | `IFM_API_AJAXREQUEST` |
| `chmod` | `IFM_API_CHMOD` |
| `copymove` | `IFM_API_COPYMOVE` |
| `createdir` | `IFM_API_CREATEDIR` |
| `createfile` | `IFM_API_CREATEFILE` |
| `edit` | `IFM_API_EDIT` |
| `delete` | `IFM_API_DELETE` |
| `download` | `IFM_API_DOWNLOAD` |
| `extract` | `IFM_API_EXTRACT` |
| `upload` | `IFM_API_UPLOAD` |
| `remoteupload` | `IFM_API_REMOTEUPLOAD` |
| `rename` | `IFM_API_RENAME` |
| `zipnload` | `IFM_API_ZIPNLOAD` |
| `showlastmodified` | `IFM_GUI_SHOWLASTMODIFIED` |
| `showfilesize` | `IFM_GUI_SHOWFILESIZE` |
| `showowner` | `IFM_GUI_SHOWOWNER` |
| `showgroup` | `IFM_GUI_SHOWGROUP` |
| `showpermissions` | `IFM_GUI_SHOWPERMISSIONS` |
| `showhtdocs` | `IFM_GUI_SHOWHTDOCS` |
| `showhiddenfiles` | `IFM_GUI_SHOWHIDDENFILES` |
| `showpath` | `IFM_GUI_SHOWPATH` |
## screenshots
<a href="https://misterunknown.de/static/ifm_screenshot_desktop_filelist.png"><img src="https://misterunknown.de/static/ifm_screenshot_desktop_filelist.png" height="300px"></a>
<a href="https://misterunknown.de/static/ifm_screenshot_mobile_filelist.png"><img src="https://misterunknown.de/static/ifm_screenshot_mobile_filelist.png" height="300px"></a>