You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added entrypoint hooks for your own custom scripts (#1964)
* Added entrypoint hooks for your own custom scripts
Signed-off-by: Dennis Vestergaard Værum <[email protected]>
* Small changes:
- Only execute shell-scripts (mening files ending with .sh)
- Sort the files before executing them, had forgotten 😅
- Added a message when a hook script finish
- Added prefix arror to message to show the are related
Signed-off-by: Dennis Vestergaard Værum <[email protected]>
* Show in the search msg that it only searches for '*.sh' files
Signed-off-by: Dennis Vestergaard Værum <[email protected]>
* Fixed spelling mistake
Co-authored-by: J0WI <[email protected]>
Signed-off-by: Dennis Værum <[email protected]>
* Updated the `README.md` file
Signed-off-by: Dennis Vestergaard Værum <[email protected]>
* change from using find to using a for-loop to located the `.sh` files
Signed-off-by: Dennis Vestergaard Værum <[email protected]>
* Fix bug - that would make docker-entrypoint.sh failed, hook folders was empty
Signed-off-by: Dennis Vestergaard Værum <[email protected]>
---------
Signed-off-by: Dennis Vestergaard Værum <[email protected]>
Signed-off-by: Dennis Værum <[email protected]>
Co-authored-by: J0WI <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -202,6 +202,38 @@ To customize other PHP limits you can simply change the following variables:
202
202
-`PHP_UPLOAD_LIMIT` (default `512M`) This sets the upload limit (`post_max_size` and `upload_max_filesize`) for big files. Note that you may have to change other limits depending on your client, webserver or operating system. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html) for more information.
203
203
204
204
205
+
## Auto configuration via hook folders
206
+
207
+
There are 5 hooks
208
+
209
+
-`pre-installation` Executed before the Nextcloud is installed/initiated
210
+
-`post-installation` Executed after the Nextcloud is installed/initiated
211
+
-`pre-upgrade` Executed before the Nextcloud is upgraded
212
+
-`post-upgrade` Executed after the Nextcloud is upgraded
213
+
-`before-starting` Executed before the Nextcloud starts
214
+
215
+
To use the hooks triggered by the `entrypoint` script, either
216
+
- Added your script(s) to the individual of the hook folder(s), which are located at the path `/docker-entrypoint-hooks.d` in the container
217
+
- Use volume(s) if you want to use script from the host system inside the container, see example.
218
+
219
+
**Note:** Only the script(s) located in a hook folder (not sub-folders), ending with `.sh` and marked as executable, will be executed.
## Using the apache image behind a reverse proxy and auto configure server host and protocol
206
238
207
239
The apache image will replace the remote addr (IP address visible to Nextcloud) with the IP address from `X-Real-IP` if the request is coming from a proxy in `10.0.0.0/8`, `172.16.0.0/12` or `192.168.0.0/16` by default. If you want Nextcloud to pick up the server host (`HTTP_X_FORWARDED_HOST`), protocol (`HTTP_X_FORWARDED_PROTO`) and client IP (`HTTP_X_FORWARDED_FOR`) from a trusted proxy, then disable rewrite IP and add the reverse proxy's IP address to `TRUSTED_PROXIES`.
0 commit comments