Compare commits

...

446 Commits

Author SHA1 Message Date
Josh 7a4823180d
Merge pull request #2216 from nextcloud/fix/readme-help
fix(README): Point help seekers to forum first
2024-05-07 11:58:49 -04:00
Josh ba9a6c2d93
fix(README): Point help seekers to forum first
Signed-off-by: Josh <josh.t.richards@gmail.com>
2024-05-06 11:57:08 -04:00
J0WI ef38201477
Bump to 28.0.5
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-04-25 23:55:07 +00:00
GitHub Workflow 19417a8eb9 Runs update.sh 2024-04-25 23:42:16 +00:00
J0WI 1741b47319
Remove 26 (#2205) 2024-04-25 23:42:04 +00:00
GitHub Workflow 473af1bed1 Runs update.sh 2024-04-24 20:53:16 +00:00
J0WI 1be53d4bee
Drop Nextcloud 26
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-04-24 20:53:02 +00:00
GitHub Workflow f7b20139eb Runs update.sh 2024-04-24 00:28:00 +00:00
J0WI f23d5d3ab4
Typo
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-04-02 21:27:11 +00:00
J0WI 5abd7eacd5
Bump to 28.0.4
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-03-29 14:21:20 +00:00
GitHub Workflow bc172f8dd2 Runs update.sh 2024-03-29 00:27:30 +00:00
J0WI 6151f60208
Update GitHub Actions (#2170)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-03-05 23:24:25 +00:00
J0WI f9ce81fb7f
Add FTP module back (#2152) (#2169)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-03-04 21:50:47 +00:00
J0WI 9034966f1a
Remove Travis file (#2176)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-03-04 21:01:25 +00:00
GitHub Workflow 399f27e707 Runs update.sh 2024-03-04 21:00:17 +00:00
J0WI 0e725c6fa5
Revert "update docker-entrypoint.sh" (#2175) 2024-03-04 21:00:00 +00:00
J0WI 3ff69e2c1d
Bump to 28.0.3 (Fix #2162)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-03-01 22:44:44 +00:00
GitHub Workflow 6701f64a00 Runs update.sh 2024-03-01 00:28:03 +00:00
Simon L 38eba12039
Merge pull request #2159 from nextcloud/enh/noid/update-readme-md
Update Readme.md
2024-02-05 14:50:06 +01:00
Simon L be444a05a2 Update Readme.md
Signed-off-by: Simon L <szaimen@e.mail.de>
2024-02-05 14:32:42 +01:00
GitHub Workflow e0ed07cfbf Runs update.sh 2024-02-05 12:08:20 +00:00
Simon L 2d624a6007
Merge pull request #2158 from nextcloud/enh/noid/update-entrypoint
update docker-entrypoint.sh
2024-02-05 12:02:58 +01:00
Simon L e869267b20 update docker-entrypoint.sh
Signed-off-by: Simon L <szaimen@e.mail.de>
2024-02-05 11:52:18 +01:00
GitHub Workflow 5aa43c00c8 Runs update.sh 2024-02-01 20:46:19 +00:00
GitHub Workflow 59dd41aaca Runs update.sh 2024-01-26 00:25:01 +00:00
Patrick Hobusch 2e9139bac8
Allow setting AWS S3 SSE-C key (#2151)
The AWS S3 SSE-C key for server side encryption can now be set using
the environment variable `OBJECTSTORE_S3_SSE_C_KEY`.

Signed-off-by: Patrick Hobusch <patrick@hobusch.net>
2024-01-26 00:24:41 +00:00
J0WI c88d31e3b8
Alpine 3.19 (#2150)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-01-25 23:50:34 +00:00
J0WI 72fad312b3
Bump to 27.1.6
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-01-25 23:08:23 +00:00
GitHub Workflow 75ae60a43a Runs update.sh 2024-01-25 13:59:48 +00:00
GitHub Workflow 39a72a4106 Runs update.sh 2024-01-16 00:04:19 +00:00
Patrick Hobusch 5dfa556afc
Allow setting AWS S3 storage class (#2138)
The AWS S3 storage class can now be set using the environment variable
`OBJECTSTORE_S3_STORAGE_CLASS`.

The order of the AWS S3 environment variables in the `README.md` has
also been adjusted to be more "logical".

Signed-off-by: Patrick Hobusch <patrick@hobusch.net>
2024-01-16 00:04:05 +00:00
Raphael Nestler f14ad96e2d
Mention minimal SMTP configuration in README.md (#2144)
Looking at d1dbc77e0b/.config/smtp.config.php
it is clear that `SMTP_HOST`, `MAIL_FROM_ADDRESS` and `MAIL_DOMAIN` must be set.

Signed-off-by: Raphael Nestler <raphael.nestler@gmail.com>
2024-01-14 01:12:38 +00:00
Josh ea64bed4f9
Merge pull request #2133 from nextcloud/enh/readme/persist-volumes-custom-upgrade-exclude
enh(README) Persistent volume upgrade.exclude clarification
2024-01-12 15:14:52 -05:00
Josh accf5bf119
Update README.md
Co-authored-by: J0WI <J0WI@users.noreply.github.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
2024-01-12 15:12:03 -05:00
J0WI bbc81a94b7
Update logo in README.md
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2024-01-09 23:12:44 +00:00
J0WI 071b888f7f
Update logo (#2143) 2024-01-09 23:04:18 +00:00
GitHub Workflow 28a76ceba4 Runs update.sh 2024-01-09 22:31:54 +00:00
Yevhen Kolomeiko d89def24d1
Fix for PR #2095 breaking post-installation scripts in k8s (#2115)
* Fix docker-entrypoint.sh

Signed-off-by: Yevhen Kolomeiko <Jarvis2709@gmail.com>

* Fix docker-entrypoint.sh for alpine

Signed-off-by: Yevhen Kolomeiko <Jarvis2709@gmail.com>

* Use '-o' instead of two find's in docker-entrypoint.sh

Signed-off-by: Yevhen Kolomeiko <Jarvis2709@gmail.com>

* Use more laconic find parameters set in docker-entrypoint.sh

Signed-off-by: Yevhen Kolomeiko <Jarvis2709@gmail.com>

---------

Signed-off-by: Yevhen Kolomeiko <Jarvis2709@gmail.com>
2024-01-09 22:31:39 +00:00
Josh Richards fd6f811978
enh(README) Persistent volume upgrade.exclude clarification
- Make the warning more prominent
- Clarify the language
- Clarity trade-offs

Fixes: #2132  

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2023-12-28 10:08:35 -05:00
GitHub Workflow 8afd97014c Runs update.sh 2023-12-21 21:31:17 +00:00
Kaloyan Nikolov b80875632e
Update the examples section according to the latest nginx configuration required. (#2123)
Signed-off-by: Kaloyan K Nikolov <tzerber@gmail.com>
2023-12-16 18:48:47 +00:00
J0WI 215498b3fe
Bump to 27.1.5
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-12-15 23:42:40 +00:00
GitHub Workflow 4cff57305b Runs update.sh 2023-12-15 00:27:36 +00:00
GitHub Workflow e6510ac594 Runs update.sh 2023-12-12 19:26:33 +00:00
J0WI d4f83969cf
Bump to 27.1.4
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-12-12 19:26:17 +00:00
GitHub Workflow 488a855c49 Runs update.sh 2023-12-11 22:54:55 +00:00
Josh Richards ed6c68451d
feat(updater): Disable web based updater for real (#2109)
Web based updates aren't used in the image, but the button remains enabled and generates an error when clicked. Let's eliminate the web updater button.

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2023-12-11 22:54:39 +00:00
Jesper Noordsij d1dbc77e0b
EOL 25 (#2102)
Signed-off-by: Jesper Noordsij <jesper@sslleiden.nl>
2023-11-24 10:42:06 +00:00
GitHub Workflow 44e01e1eab Runs update.sh 2023-11-24 00:27:31 +00:00
GitHub Workflow cd0562ba8c Runs update.sh 2023-11-14 23:11:32 +00:00
Dennis Værum 23d099bc33
Bug fix: not found error if hook folder contains files but non ending with `*.sh` (#2095)
* Use `find` to located `*.sh`

Signed-off-by: Dennis Vestergaard Værum <github@varum.dk>

* added msg if hook folder does not exist

Signed-off-by: Dennis Vestergaard Værum <github@varum.dk>

* Updated info message

Co-authored-by: J0WI <J0WI@users.noreply.github.com>
Signed-off-by: Dennis Værum <6872940+dvaerum@users.noreply.github.com>

* Update docker-entrypoint.sh

Small adjustments

Signed-off-by: Dennis Værum <6872940+dvaerum@users.noreply.github.com>

---------

Signed-off-by: Dennis Vestergaard Værum <github@varum.dk>
Signed-off-by: Dennis Værum <6872940+dvaerum@users.noreply.github.com>
Co-authored-by: J0WI <J0WI@users.noreply.github.com>
2023-11-14 23:11:10 +00:00
GitHub Workflow 2bfad53543 Runs update.sh 2023-11-14 22:41:10 +00:00
Marcel 3cbec37106
Add crond log level environment variable (#1805)
* Update docker-cron.sh

Signed-off-by: Marcel <34819524+MarcelCoding@users.noreply.github.com>

* Update stack.yml

Signed-off-by: Marcel <34819524+MarcelCoding@users.noreply.github.com>

* Update docker-cron.sh

* Update docker-cron.sh

Signed-off-by: Marcel <34819524+MarcelCoding@users.noreply.github.com>

* Update stack.yml

Signed-off-by: Marcel <34819524+MarcelCoding@users.noreply.github.com>

---------

Signed-off-by: Marcel <34819524+MarcelCoding@users.noreply.github.com>
2023-11-14 22:40:54 +00:00
GitHub Workflow aaadffffb3 Runs update.sh 2023-11-12 00:34:24 +00:00
Josh Richards 8a08d4191c
Issue template: Reminder to include Compose/run + config (#2088)
Reports often come in lacking Compose files or run commands. Same goes for `config.php`.

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2023-11-10 18:21:24 +00:00
J0WI 37ee8cfdab
Bump to 27.1.3
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-10-26 20:27:45 +00:00
GitHub Workflow 4c24a2ae8e Runs update.sh 2023-10-26 20:01:40 +00:00
GitHub Workflow bc963e0382 Runs update.sh 2023-10-23 00:28:56 +00:00
am97 9dd8dcd5ee
Remove legacy header X-Download-Options in nginx.conf examples (#2077)
The header was relevant for Internet Explorer only and was removed from the nextcloud/server code: ea0e45d81e

Signed-off-by: Andrés Maldonado <maldonado@codelutin.com>
2023-10-15 18:17:21 +00:00
J0WI 2d39d9d190
Bump to 27.1.2
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-10-06 11:36:11 +00:00
GitHub Workflow 3f2d22d420 Runs update.sh 2023-10-06 00:30:07 +00:00
GitHub Workflow fef9785e23 Runs update.sh 2023-09-24 00:28:00 +00:00
J0WI 766fd4e078
Bump to 27.1.1
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-09-21 20:26:48 +00:00
GitHub Workflow b008ff8bb7 Runs update.sh 2023-09-21 20:24:53 +00:00
J0WI 1ed450b540
Bump to 27.1.0
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-09-16 22:53:12 +00:00
GitHub Workflow 3fa92257f9 Runs update.sh 2023-09-16 22:51:59 +00:00
adripo 90064ed260
Set Apache LimitRequestBody with env variable APACHE_BODY_LIMIT (#2065)
* feat: set apache LimitRequestBody

Signed-off-by: adripo <26493496+adripo@users.noreply.github.com>

* feat: APACHE_BODY_LIMIT variable

Signed-off-by: adripo <26493496+adripo@users.noreply.github.com>

* fix: move ENV to existing VARIANT_EXTRAS

Signed-off-by: adripo <26493496+adripo@users.noreply.github.com>

* docs: updated var description

Signed-off-by: adripo <26493496+adripo@users.noreply.github.com>

* fix: remove comment

Signed-off-by: adripo <26493496+adripo@users.noreply.github.com>

---------

Signed-off-by: adripo <26493496+adripo@users.noreply.github.com>
2023-09-16 22:51:45 +00:00
GitHub Workflow 4cd70385b8 Runs update.sh 2023-09-16 00:27:19 +00:00
J0WI 03a967db4e
Bump to 26.0.5 (fix #2061)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-09-14 22:24:34 +00:00
GitHub Workflow 467a98dcc9 Runs update.sh 2023-09-14 21:56:13 +00:00
GitHub Workflow 12390fb508 Runs update.sh 2023-09-10 00:29:29 +00:00
GitHub Workflow f9ae675c1a Runs update.sh 2023-08-20 21:19:25 +00:00
Mossroy 04e4138db5
Replace RemoteIPTrustedProxy by RemoteIPInternalProxy in remoteip.conf (#2004)
Else the internal IP ranges are ignored
See https://httpd.apache.org/docs/2.4/en/mod/mod_remoteip.html#remoteiptrustedproxy and https://httpd.apache.org/docs/2.4/en/mod/mod_remoteip.html#remoteipinternalproxy

Signed-off-by: Mossroy <mossroy@mossroy.fr>
2023-08-20 21:19:13 +00:00
J0WI c4966442a6
Bump to 26.0.5 (#2050)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-08-10 23:40:32 +00:00
David Li 625dd013fa
Apply changes from #2033 to the examples. (#2046)
Signed-off-by: David Li <david@davidl.me>
2023-08-10 23:10:13 +00:00
GitHub Workflow 09fecda406 Runs update.sh 2023-08-10 22:36:51 +00:00
J0WI 7bd3b7b6db
Stable 26.0.4
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-07-24 19:38:15 +00:00
GitHub Workflow f0f6fc1f03 Runs update.sh 2023-07-24 19:36:18 +00:00
J0WI d3b3eeba85
Debian Bookworm (#2033)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-07-24 19:36:02 +00:00
GitHub Workflow 1b913eb0e9 Runs update.sh 2023-07-20 11:47:38 +00:00
GitHub Workflow 38b8110c58 Runs update.sh 2023-07-09 20:20:25 +00:00
Antonin Delpeuch a68c6ef348
Block upgrade if it is not supported because major versions are too different (#2018)
* Block upgrade if it is not supported

Closes #1809. This prevents the install from getting in a state where none
of the Docker images will accept running given the contents of the volumes.

Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu>

* Update docker-entrypoint.sh

Co-authored-by: J0WI <J0WI@users.noreply.github.com>
Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu>

* Update docker-entrypoint.sh

Co-authored-by: J0WI <J0WI@users.noreply.github.com>
Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu>

* Remove extra function

Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu>

* Update docker-entrypoint.sh

Co-authored-by: J0WI <J0WI@users.noreply.github.com>
Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu>

---------

Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu>
Co-authored-by: J0WI <J0WI@users.noreply.github.com>
2023-07-09 20:20:10 +00:00
J0WI 74d33d0020
Stable 26.0.3 (fix #2016)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-06-22 16:10:00 +00:00
GitHub Workflow 040d8687a6 Runs update.sh 2023-06-22 16:06:52 +00:00
Dennis Værum d3251467e6
Added entrypoint hooks for your own custom scripts (#1964)
* Added entrypoint hooks for your own custom scripts

Signed-off-by: Dennis Vestergaard Værum <github@varum.dk>

* 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 <github@varum.dk>

* Show in the search msg that it only searches for '*.sh' files

Signed-off-by: Dennis Vestergaard Værum <github@varum.dk>

* Fixed spelling mistake

Co-authored-by: J0WI <J0WI@users.noreply.github.com>
Signed-off-by: Dennis Værum <6872940+dvaerum@users.noreply.github.com>

* Updated the `README.md` file

Signed-off-by: Dennis Vestergaard Værum <github@varum.dk>

* change from using find to using a for-loop to located the `.sh` files

Signed-off-by: Dennis Vestergaard Værum <github@varum.dk>

* Fix bug - that would make docker-entrypoint.sh failed, hook folders was empty

Signed-off-by: Dennis Vestergaard Værum <github@varum.dk>

---------

Signed-off-by: Dennis Vestergaard Værum <github@varum.dk>
Signed-off-by: Dennis Værum <6872940+dvaerum@users.noreply.github.com>
Co-authored-by: J0WI <J0WI@users.noreply.github.com>
2023-06-22 16:06:37 +00:00
GitHub Workflow ceb2893af1 Runs update.sh 2023-06-13 15:13:35 +00:00
Simon L 35e99028fb
adjust readme again to be a bit more verbose about what AIO is (#2006)
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-06-09 12:07:41 +00:00
J0WI 22d28e45cd
Alpine 3.18 & PHP 8.2 (#1989)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-05-31 15:17:36 +00:00
J0WI fb5866ada9
Use no-network option (#2000)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-05-31 15:16:04 +00:00
GitHub Workflow d24ce74201 Runs update.sh 2023-05-31 13:11:48 +00:00
J0WI 4298972d2e
Restore PHP 8.1 for Nextcloud 25 (#1998)
https://github.com/docker-library/php/pull/1412

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-05-31 13:06:10 +00:00
Daniel Rudolf 570ac60ed2
Add versions.json (#1995)
* Add %%DEBIAN_VERSION%% placeholder

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>

* Replace %%BASE_DOWNLOAD_URL%% placeholder by %%DOWNLOAD_URL{_ASC}%%

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>

* Add version.json

'versions.json' contains information about the latest branches and variants. It is managed by `./update.sh`, there's no need to edit this file manually, just run `./update.sh`.

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>

* Run update.sh

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>

---------

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2023-05-31 12:13:56 +00:00
Nextcloud Command Bot f2c8cb599e
chore: update workflows from templates (#1993)
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Co-authored-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-05-28 10:15:55 +00:00
J0WI 646bef90e2
25.0.7 (#1987)
https://github.com/nextcloud-releases/updater_server/pull/869/commits

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-05-26 01:04:35 +00:00
J0WI 136a20de32
Downgrade Nextcloud 25 to PHP 8.0 due OpenSSL 1.1/Alpine 3.16 (#1990)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-05-26 01:00:58 +00:00
J0WI 8394b4967c
EOL 24 (#1988)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-05-25 23:03:53 +00:00
GitHub Workflow 9b84086ab9 Runs update.sh 2023-05-25 22:23:21 +00:00
kn0wmad 5d6b615a8e
Update README.md (#1983)
Signed-off-by: kn0wmad <39687477+kn0wmad@users.noreply.github.com>
2023-05-25 22:23:01 +00:00
J0WI 2d8f990304
Stable 25.0.6
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-04-20 14:57:03 +00:00
GitHub Workflow 620d4d68f4 Runs update.sh 2023-04-20 13:11:17 +00:00
Stavros Kois 8df9b2617e
Updates X-Robot-Tag in nginx.conf examples (#1960)
* Update X-Robot-Tag in nginx.conf example

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* update nginx.conf examples

* Update .examples/docker-compose/insecure/mariadb/fpm/web/nginx.conf

Co-authored-by: J0WI <J0WI@users.noreply.github.com>
Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* apply to all files

---------

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: J0WI <J0WI@users.noreply.github.com>
2023-04-02 16:33:05 +00:00
J0WI ee394835b7
Stable 25.0.5 (#1961) 2023-04-02 15:39:27 +00:00
J0WI 3eb80c52b1
Support SELinux in docker-compose.yml examples (fix #324) (#1957)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-03-28 16:05:53 +00:00
J0WI 30bb621341
Update MariaDB to 10.6 (#1956)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-03-28 15:35:15 +00:00
GitHub Workflow cf30668784 Runs update.sh 2023-03-28 13:51:27 +00:00
Anderson Entwistle e1b1923861
feat: support object store credentials from file (#1946)
Signed-off-by: Anderson Entwistle <46688047+aentwist@users.noreply.github.com>
2023-03-28 13:50:55 +00:00
GitHub Workflow 1ca0f40af4 Runs update.sh 2023-03-24 00:27:35 +00:00
GitHub Workflow 289f0bb8a3 Runs update.sh 2023-03-21 22:44:45 +00:00
J0WI 165698da7b
Alpine 3.17 (#1953)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-03-21 22:44:22 +00:00
GitHub Workflow 89a0b8904e Runs update.sh 2023-03-21 19:31:45 +00:00
J0WI 8c9cdd1268
Add sysvsem (#1952)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-03-21 19:31:21 +00:00
GitHub Workflow 6cb8913dc4 Runs update.sh 2023-03-21 18:46:08 +00:00
J0WI 321d0b29a0
Remove EOL 23 (#1951)
* Remove EOL 23

Signed-off-by: J0WI <J0WI@users.noreply.github.com>

* Clenaup GMP extension installation

Signed-off-by: J0WI <J0WI@users.noreply.github.com>

---------

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-03-21 18:45:38 +00:00
GitHub Workflow 287f6ddc86 Runs update.sh 2023-03-21 18:20:33 +00:00
severinkaelin 9919d713e6
Reference latest instead of hardcoded versions in admin manual links (#1947)
Signed-off-by: severinkaelin <39438642+severinkaelin@users.noreply.github.com>
2023-03-21 18:02:17 +00:00
Ben Siddans 31c59aea24
Add words to README to draw attention to the use of upgrades.exclude, potential for files to be removed during installation/upgrades. (#1862) 2023-03-04 19:16:46 +00:00
okrc bcb0642e00
Fixed broken link (#1931)
Signed-off-by: okrc <okrc@hexo.dev>
2023-03-04 19:13:45 +00:00
Daniel 4abe7df9d5
docs(smtp): clearify on mail_from_address (#1929)
mail_from_address will overwrite the local-part for the from address.

Signed-off-by: Daniel <mail@danielkesselberg.de>
2023-03-04 18:46:17 +00:00
GitHub Workflow f8169f6804 Runs update.sh 2023-03-02 06:21:38 +00:00
John Molakvoæ 3827f0119f
Merge pull request #1927 from simonmicro/patch-1 2023-03-02 07:19:19 +01:00
simonmicro e7eb6af83c
Fix for Nextcloud opcache-complains 2023-03-01 22:57:40 +01:00
John Molakvoæ aac4d09c74
Merge pull request #1905 from remram44/lock 2023-03-01 11:06:29 +01:00
J0WI c5a8a8863b
25.0.4 (#1924) 2023-02-23 22:44:19 +00:00
GitHub Workflow d266acccf0 Runs update.sh 2023-02-23 21:46:37 +00:00
Simon L c13521ce12
README: update to reflect support of these images vs enterprise and AIO (#1916)
* README: update to reflect support of these images vs enterprise and AIO

Signed-off-by: Simon L <szaimen@e.mail.de>

* address review by J0WI

Signed-off-by: Simon L <szaimen@e.mail.de>

---------

Signed-off-by: Simon L <szaimen@e.mail.de>
2023-02-19 18:33:07 +00:00
Adam Monsen d1d0d89ba7
Enable MariaDB binary log (#1881)
* Enable MariaDB binary log

This resolves a warning in the database server log:

    [Warning] You need to use --log-bin to make --binlog-format work.

Pros:

* support for point-in-time recovery
* necessary for replication

Cons:

* slows down database operations ("slightly", per the manual)
* takes up disk space (mitigated by `--expire-logs-days=2`)

See also:

* <https://mariadb.com/kb/en/binary-log/>
* <https://mariadb.com/kb/en/full-list-of-mariadb-options-system-and-status-variables/>

Alternatives:

1. Do not add `--log-bin`. Remove `--binlog-format` instead. This causes the least amount of change for existing installations.

Signed-off-by: Adam Monsen <haircut@gmail.com>

* remove --expire-logs-days=2 mariadb flag

This better aligns with recommendations in the Nextcloud documentation.

Also: the flag isn't necessary. There are already set times for cleanup: The MySQL and MariaDB documentation both state that binary logs will be purged on startup and flush/rotation.

Signed-off-by: Adam Monsen <haircut@gmail.com>

---------

Signed-off-by: Adam Monsen <haircut@gmail.com>
2023-02-17 14:13:12 +00:00
Remi Rampin 8c93a5c53e Run update.sh
Signed-off-by: Remi Rampin <remi@rampin.org>
2023-02-08 14:05:11 -05:00
Remi Rampin 405e815285 Un-factor do_install_or_upgrade()
Signed-off-by: Remi Rampin <remi@rampin.org>
2023-02-08 14:05:08 -05:00
Remi Rampin 8aabc4b3ea Remove NEXTCLOUD_INIT_LOCK
Signed-off-by: Remi Rampin <remi@rampin.org>
2023-02-08 14:05:00 -05:00
Adam Monsen f49b1edcaa
add note about running non-root with cron (#1901)
Signed-off-by: Adam Monsen <haircut@gmail.com>
2023-02-08 14:58:59 +00:00
GitHub Workflow 2a5b0881cd Runs update.sh 2023-02-08 14:52:36 +00:00
Varun Patil e4f5b95e1e
Enable JIT (#1829)
Signed-off-by: Varun Patil <radialapps@gmail.com>
2023-02-08 14:50:46 +00:00
Remi Rampin 295cdf7fb7 Run update.sh
Signed-off-by: Remi Rampin <remi@rampin.org>
2023-01-27 11:08:07 -05:00
Remi Rampin 4667cbe149 Use flock to lock the whole upgrade process
Signed-off-by: Remi Rampin <remi@rampin.org>
2023-01-27 11:08:06 -05:00
Remi Rampin df9653a00c Remove old locking logic
Signed-off-by: Remi Rampin <remi@rampin.org>
2023-01-27 11:08:04 -05:00
Remi Rampin 7a0aba93a2 Factor do_install_or_upgrade()
Signed-off-by: Remi Rampin <remi@rampin.org>
2023-01-27 11:07:43 -05:00
J0WI 2ffebc1e35
Bump stable to 25.0.3 (#1900)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2023-01-17 18:45:16 +00:00
thomasmerz c66b03b8c6
🩹 fix deprecation warning: Node.js 12 actions are deprecated. (#1885)
* 🩹 fix deprecation warning:

   Node.js 12 actions are deprecated.
   For more information see:
   https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
   Please update the following actions to use Node.js 16: actions/checkout@master

   Using version v3, latest or master: actions/checkout#689

Signed-off-by: Thomas Merz <git@rhoenwurz.de>

* Update .github/workflows/update-sh.yml

Co-authored-by: J0WI <J0WI@users.noreply.github.com>
Signed-off-by: thomasmerz <thomasmerz@users.noreply.github.com>

Signed-off-by: Thomas Merz <git@rhoenwurz.de>
Signed-off-by: thomasmerz <thomasmerz@users.noreply.github.com>
Co-authored-by: J0WI <J0WI@users.noreply.github.com>
2023-01-17 18:01:42 +00:00
GitHub Workflow c1a5232542 Runs update.sh 2023-01-17 16:41:48 +00:00
J0WI 04ab3157e4
Bump stable Version to 25 (fix #1865) (#1878) 2022-12-08 22:44:37 +00:00
GitHub Workflow 540648f7ed Runs update.sh 2022-12-08 21:52:41 +00:00
J0WI 6103e074d8
Fix #1021 (#1872)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-12-01 00:19:39 +00:00
J0WI 29ef76288a
Fix #1021 (#1871) 2022-12-01 00:16:52 +00:00
GitHub Workflow 48f223fc7f Runs update.sh 2022-11-28 16:13:06 +00:00
J0WI 24440af0d5
Enhance shell syntax (#1868)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-11-28 16:12:46 +00:00
Tianon Gravi c83394d97e
Update GitHub Actions to use new bashbrew action (#1861)
This should fix errors that the old code would've run into thanks to the update to Go 1.18, and should help prevent them in the future by pinning to a specific release of both Bashbrew and the related scripts.

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2022-11-26 14:27:18 +00:00
Justin Lamp dfb538c5c7
Fixes warning about svg support missing (#1789)
* Include imagick in all flavours

Signed-off-by: Justin Lamp <justin.lamp@netways.de>

* Fix alpine imagick version

Signed-off-by: Justin Lamp <justin.lamp@netways.de>

* Changed alpine package to imagemagick
php extension is already present, so only install imagemagick

Signed-off-by: modzilla99 <justin.lamp96@gmail.com>

Signed-off-by: Justin Lamp <justin.lamp@netways.de>
Signed-off-by: modzilla99 <justin.lamp96@gmail.com>
2022-11-15 14:36:51 +01:00
J0WI 625445fbe9
Bump to 24.0.7
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-11-03 17:51:31 +00:00
GitHub Workflow 739d699640 Runs update.sh 2022-11-03 16:15:06 +00:00
MAbeeTT (Matías Pecchia) aa779c7c92
prevents running `occ maintenance:update:htaccess` on a first run volume (#1843)
Signed-off-by: Matías Pecchia <179218+mabeett@users.noreply.github.com>

Signed-off-by: Matías Pecchia <179218+mabeett@users.noreply.github.com>
2022-11-03 16:13:35 +00:00
GitHub Workflow 88568fb121 Runs update.sh 2022-11-03 15:32:23 +00:00
GitHub Workflow de77074a55 Runs update.sh 2022-10-19 15:06:11 +00:00
J0WI ea1360defa
PHP 8.1 (#1841)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-10-19 14:58:40 +00:00
Florian Friedrich 20327851c8
Update stable to 24.0.6 (#1832)
Signed-off-by: Florian Friedrich <ffried@me.com>

Signed-off-by: Florian Friedrich <ffried@me.com>
2022-10-07 11:28:11 +00:00
GitHub Workflow d934a4b578 Runs update.sh 2022-10-06 13:36:28 +00:00
J0WI f69a48834e
Fix mysql import in nextcloud readme
https://github.com/docker-library/docs/pull/2210

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-10-05 20:15:07 +00:00
GitHub Workflow 85e22b4a8e Runs update.sh 2022-09-20 00:33:20 +00:00
J0WI fa4d98490c
24.0.5 (#1817)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-09-08 19:20:52 +00:00
GitHub Workflow 3cbad551c3 Runs update.sh 2022-09-08 19:11:46 +00:00
J0WI 3c7c42e604
Allow manual run
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-09-07 14:19:40 +00:00
GitHub Workflow b30812dea9 Runs update.sh 2022-09-06 16:46:19 +00:00
J0WI 19256cdbf8
Allow to run with custom uid (#1812)
fix: #359, #772, #1081, #1087, #1278

Signed-off-by: J0WI <J0WI@users.noreply.github.com>

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-09-06 16:46:03 +00:00
Adam Monsen 2a5bc6f3bb
enable mariadb auto upgrade (#1814)
* enable mariadb auto upgrade

This fixes after-upgrade issues, for example:

    [ERROR] Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type varchar(, found type char(141).

The upgrade only happens when necessary.

I also disabled the system database backup because I assume users create
and test their own backups.

Signed-off-by: Adam Monsen <haircut@gmail.com>

* use 1s instead of "yesplease"

Any nonzero value is valid for these environment variables.

Signed-off-by: Adam Monsen <haircut@gmail.com>

Signed-off-by: Adam Monsen <haircut@gmail.com>
2022-09-06 16:45:45 +00:00
GitHub Workflow 338b483247 Runs update.sh 2022-09-02 13:00:36 +00:00
Mehdi Zakaria Benadel d447c5793a
fix SMTP_PASSWORD_FILE not triggering auth activation (#1614)
Signed-off-by: Mehdi Benadel <mehdi.benadel@gmail.com>

Signed-off-by: Mehdi Benadel <mehdi.benadel@gmail.com>
2022-09-02 13:00:12 +00:00
J0WI 685803da0b
Remove 22 (#1813)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-09-01 14:25:06 +00:00
J0WI b71e398d57
24.0.4 (#1804)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-08-12 11:05:48 +00:00
GitHub Workflow 6d25698ea3 Runs update.sh 2022-08-12 00:28:01 +00:00
J0WI 8dd3d45f63
22 EOL (#1800)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-08-07 16:32:42 +00:00
J0WI 6e7695e443
Bump stable channel (#1792) 2022-07-18 19:59:06 +00:00
GitHub Workflow 8cfb0e50ef Runs update.sh 2022-07-18 17:05:32 +00:00
J0WI cde03854f6
Use $PHP_INI_DIR var (#1790)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-07-18 16:53:48 +00:00
Elias fa31dabcab
stable 24.0.2 (#1783) 2022-07-18 16:53:37 +00:00
GitHub Workflow 941450c1fb Runs update.sh 2022-06-30 13:16:23 +00:00
Thomas Clavier 502fda1f7a
Use $PHP_INI_DIR var (#1765)
* Use $PHP_INI_DIR var

* Update 24/fpm/Dockerfile

Co-authored-by: J0WI <J0WI@users.noreply.github.com>

* Update 24/fpm/Dockerfile

Co-authored-by: J0WI <J0WI@users.noreply.github.com>

Co-authored-by: J0WI <J0WI@users.noreply.github.com>
2022-06-30 13:12:07 +00:00
GitHub Workflow 66f397fd74 Runs update.sh 2022-06-30 13:06:30 +00:00
J0WI 3df4ad5737
Alpine 3.16 (#1779)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-06-30 13:04:35 +00:00
GitHub Workflow 0eda450eb9 Runs update.sh 2022-06-30 12:59:37 +00:00
John Molakvoæ 209d65d0b6
Add `NEXTCLOUD_INIT_HTACCESS` to run `occ maintenance:update:htaccess` after init (#1761)
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-06-30 12:59:15 +00:00
J0WI c416385b7c
Update Nextcloud to 24.0.2 (#1773)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-06-20 20:50:48 +00:00
John Molakvoæ e88d8e4681
Merge pull request #1739 from nextcloud/feat/workflow-auto-update-command-rebase.yml 2022-06-15 08:17:06 +02:00
Nextcloud bot ce6a874471 Updating command-rebase.yml workflow from template
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-11 15:15:03 +00:00
GitHub Workflow 00d88733d0 Runs update.sh 2022-06-07 12:26:59 +00:00
John Molakvoæ ec3f7e55c4
Merge pull request #1760 from nextcloud/feat/config-flag-init 2022-06-07 14:26:35 +02:00
John Molakvoæ 83d5e72596
Add `NEXTCLOUD_INIT_LOCK` to enable shared html volume update
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-06-01 08:18:10 +02:00
J0WI d11d42bb20
23.0.5 (#1755) 2022-05-20 18:38:53 +00:00
GitHub Workflow de57fc0cc7 Runs update.sh 2022-05-20 00:27:35 +00:00
GitHub Workflow 625472cfa3 Runs update.sh 2022-05-04 00:27:42 +00:00
GitHub Workflow 4f071a6f44 Runs update.sh 2022-04-28 18:32:56 +00:00
J0WI 7a89d751ca
Limit until loop (#1741)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-04-28 18:32:38 +00:00
J0WI 3f42156a07
23.0.4 stable (#1738)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-04-26 13:36:15 +00:00
John Molakvoæ 00c518023a
Merge pull request #1737 from J0WI/readme-typos 2022-04-26 07:52:44 +02:00
GitHub Workflow a497f03af8 Runs update.sh 2022-04-26 05:42:34 +00:00
J0WI f511ef284b Minor typos
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-04-25 21:12:07 +02:00
John Molakvoæ b842cb3bb5
Merge pull request #1728 from nextcloud/feat/simultaneaous-html-init 2022-04-22 10:22:31 +02:00
John Molakvoæ 35b8ebf954 Allow simultaneous initialization of common html volume
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-22 10:05:17 +02:00
John Molakvoæ e76b7cab35
Merge pull request #1732 from nextcloud/revert-1684-feature/healthcheck 2022-04-14 15:43:53 +02:00
John Molakvoæ ca1e773918
Revert "Add healthcheck" 2022-04-14 15:26:20 +02:00
John Molakvoæ f9d8052b48
Merge pull request #1684 from TheLastProject/feature/healthcheck
Add healthcheck
2022-04-14 09:05:53 +02:00
John Molakvoæ 4bb8d00ed5
Create command-rebase.yml 2022-04-14 08:59:09 +02:00
John Molakvoæ 1bd3a50196
Merge pull request #1730 from nextcloud/add/summary-mandatory-step 2022-04-14 08:55:50 +02:00
Sylvia van Os 8355426311 Add healthcheck
This checks if status.php returns succesfully to determine if the
Nextcloud instance is health.

Signed-off-by: Sylvia van Os <sylvia@hackerchick.me>
2022-04-13 19:03:06 +02:00
John Molakvoæ 58273cdd36
Merge pull request #1698 from t3easy/hide-nginx-infos 2022-04-13 16:53:09 +02:00
John Molakvoæ 2753dadf00
Add mandatory summary step for branches protection 2022-04-13 16:02:47 +02:00
GitHub Workflow da935d26bb Runs update.sh 2022-03-28 15:31:20 +00:00
J0WI e36ca5ff96
Fix regex for pecl prereleases (#1725)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-03-28 15:30:51 +00:00
Manuel Rüger 71f4a94464
update.sh: Remove unused paths (#1723)
As php 7.x is not used anymore, these can be removed.

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-03-28 15:30:37 +00:00
J0WI 97f99dbfdb
22.2.6 stable 2022-03-23 16:47:09 +00:00
J0WI 0d4c78dcc0
Remove 21 EOL (#1720) 2022-03-23 16:44:01 +00:00
GitHub Workflow fb33f156a8 Runs update.sh 2022-03-23 11:27:46 +00:00
J0WI d27ec71090
Set recommend opcache.revalidate_freq (#1718)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-03-23 11:27:28 +00:00
J0WI 7d6837dbbe
Remove Nextcloud 21 (EOL) (#1719)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-03-23 11:01:22 +00:00
GitHub Workflow 04d461e416 Runs update.sh 2022-03-23 09:57:03 +00:00
rugk 6478d4d0ce
Increase (double) opcache string buffer size (#1702)
* Increase (double) opcache string buffer size (debian)

This fixes https://github.com/nextcloud/docker/issues/1692

* Increase (double) opcache string buffer size (alpine)

This fixes #1692
2022-03-23 09:53:53 +00:00
GitHub Workflow df168e19ce Runs update.sh 2022-03-22 00:27:27 +00:00
GitHub Workflow 3a5086de63 Runs update.sh 2022-03-11 00:27:46 +00:00
GitHub Workflow 76b79690dc Runs update.sh 2022-03-08 00:27:30 +00:00
GitHub Workflow 3fd3a40ee1 Runs update.sh 2022-02-20 19:45:36 +00:00
rugk 13eb6969c6
doc: fix link to OpCache server doc (#1703)
* doc: fix link to OpCache server doc

* doc: fix link to OpCache server doc
2022-02-20 19:45:22 +00:00
Doncho N. Gunchev ababef74e9
Revert "Simplify first character check in entrypoint.sh (#1679)" #1699 (#1701)
.In php:8.0-fpm-bullseye /bin/sh is dash, which does not support "${X:0:1}"
(substring expansion).

This reverts commit 0536522175.

Signed-off-by: Doncho N. Gunchev <dgunchev@gmail.com>
2022-02-18 18:28:09 +00:00
Thomas131 4b7b164953
Push to 22.2.5 (#1696)
Signed-off-by: Thomas131 <t@t131.us.to>

Co-authored-by: Thomas131 <t@t131.us.to>
2022-02-17 16:29:02 +00:00
Jan Kiesewetter 522559eefd Prevent nginx HTTP Server Detection
Signed-off-by: Jan Kiesewetter <jan@t3easy.de>
2022-02-17 14:55:39 +01:00
GitHub Workflow 211229f8dc Runs update.sh 2022-02-16 00:27:09 +00:00
Doncho N. Gunchev 0536522175
Simplify first character check in entrypoint.sh (#1679)
Signed-off-by: Doncho N. Gunchev <dgunchev@gmail.com>
2022-02-08 18:43:35 +00:00
GitHub Workflow dcf058fb55 Runs update.sh 2022-01-29 00:26:49 +00:00
GitHub Workflow a9af37b1ec Runs update.sh 2022-01-18 00:27:01 +00:00
koderik 365c4f8400
fixed spacing error (#1664)
Signed-off-by: koderik <erik.sandlov@gmail.com>

Co-authored-by: koderik <erik.sandlov@gmail.com>
2022-01-14 13:18:16 +00:00
Brian Lee 1b80124463
Add link to nginx configuration instructions (#1663) 2022-01-14 10:36:17 +00:00
Lejo 0201ea31f4
Revert volumes_from (#1677)
Signed-off-by: Lejo1 <Lejo_1@web.de>
2022-01-14 10:35:13 +00:00
GitHub Workflow 111add0e1c Runs update.sh 2022-01-13 00:27:12 +00:00
Felix Bühler 961aeb147e
run bash via env command (#1637)
`#!/usr/bin/env` searches `PATH` for `bash`, and `bash` is not always in `/bin``

Signed-off-by: Felix Buehler <account@buehler.rocks>
2022-01-07 22:22:35 +00:00
GitHub Workflow c046638a98 Runs update.sh 2021-12-19 00:27:12 +00:00
Charlie Macfarlane Brodie 44a55665a3
Changed 'to' to 'in' (#1649)
Updated the wording of the comments for one of the docker-compose examples to more correct english usage.

Signed-off-by: Charlie MacFarlane Brodie <mail@charliebrodie.com>
2021-12-10 09:54:05 +00:00
Lejo 3619c0caac
Update Nginx-Proxy Docker repository (#1644)
Signed-off-by: Lejo1 <Lejo_1@web.de>
2021-12-10 09:53:51 +00:00
GitHub Workflow 5a189c719d Runs update.sh 2021-11-30 23:35:40 +00:00
J0WI 484b2c57a3
Alpine 3.15 (#1643)
* Alpine 3.15

Signed-off-by: J0WI <J0WI@users.noreply.github.com>

* Remove reference to 20

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-11-30 23:35:20 +00:00
J0WI e2dc98dea4
Nextcloud 23 (#1642)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-11-30 23:17:47 +00:00
GitHub Workflow 905972656e Runs update.sh 2021-11-29 22:31:17 +00:00
Simon Tushev 2857b4b3f1
Added fetching autoconfig data from Docker secrets (#1516)
* Added fetching autoconfig data from Docker secrets

Signed-off-by: Simon Tushev <tushev@users.noreply.github.com>

* Docker secrets now have priority over ENV variables; improved README.md

Signed-off-by: Simon Tushev <tushev@users.noreply.github.com>
2021-11-29 22:30:57 +00:00
aney1 f4dbcf523a
add rewrite rule from official docs to nginx examples (#1635)
Without this rewrite rule you can't access some pages (like LDAP config).
These lines are present in the official docs: https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html

Signed-off-by: aney1 <aney1@users.noreply.github.com>
2021-11-25 13:04:39 +00:00
Klaus Frank 6e54048644
Add OVERWRITECLIURL env var (#1622)
Signed-off-by: Klaus Frank <git@frank.fyi>
2021-11-25 13:03:48 +00:00
rafgk d82bc95d11
Switch to new nginx companion registry. (#1571)
As stated in https://hub.docker.com/r/jrcs/letsencrypt-nginx-proxy-companion/ the the project has moved to a new registry and therefore that should be used instead.
2021-11-25 12:42:57 +00:00
Tilo Spannagel 603c2ead2e
Merge pull request #1636 from Stunkymonkey/nextcloud-22.2.3
Update stable to 22.2.3
2021-11-16 21:13:36 +01:00
Felix Buehler e3c4b823e3 Update stable to 22.2.3
Signed-off-by: Felix Buehler <account@buehler.rocks>
2021-11-16 14:24:48 +01:00
GitHub Workflow 4821c307e9 Runs update.sh 2021-11-16 00:26:49 +00:00
J0WI e26adedbdb
Update stable to 22.2.2 (#1631) 2021-11-13 21:44:17 +00:00
GitHub Workflow dc24ba0fcb Runs update.sh 2021-11-13 00:26:50 +00:00
GitHub Workflow 7fc6772513 Runs update.sh 2021-11-12 00:26:52 +00:00
Thomas131 05d4746aa3
Upgrade to 22.2.0 (#1616)
Signed-off-by: Thomas131 <t@t131.us.to>

Co-authored-by: Thomas131 <t@t131.us.to>
2021-10-20 19:32:15 +00:00
GitHub Workflow dd37882f3e Runs update.sh 2021-10-20 19:13:59 +00:00
am97 f0ae2d018b
Add libldap-common as runtime dependency, not build dependency (#1609)
Signed-off-by: Andrés Maldonado <maldonado@codelutin.com>

Co-authored-by: Andrés Maldonado <maldonado@codelutin.com>
2021-10-20 19:12:43 +00:00
J0WI 652416e651
Stable 21.0.5 (#1611) 2021-10-14 20:36:06 +00:00
GitHub Workflow 2163ed293a Runs update.sh 2021-10-08 00:27:12 +00:00
GitHub Workflow de88409898 Runs update.sh 2021-09-30 12:59:12 +00:00
sleif 9d83a82b63
also install libldap-common to get a valid /etc/ldap/ldap.conf file (#1586)
related to https://github.com/nextcloud/docker/issues/1572

Signed-off-by: Sebastian BERTHOLD <5272331+sleif@users.noreply.github.com>
2021-09-30 12:58:53 +00:00
GitHub Workflow b67f507e77 Runs update.sh 2021-08-29 15:20:29 +00:00
J0WI 9ec9b3b4c5
PHP 8.0 for 22+ (#1563)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-08-29 15:20:12 +00:00
GitHub Workflow 854c696d5f Runs update.sh 2021-08-27 10:38:37 +00:00
J0WI 25a19158fc
Update to Bullseye (#1562)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-08-27 10:38:19 +00:00
GitHub Workflow 57a0401c74 Runs update.sh 2021-08-27 00:26:52 +00:00
Marcel Blöcher c9143621ba
fix acme volume with letsencrypt-nginx-proxy-companion >= v2.0.0 (#1358)
Signed-off-by: Marcel Blöcher <mblo@users.noreply.github.com>
2021-08-23 12:42:38 +00:00
J0WI 3a1f59b21c
Adopt new version scheme (#1553)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-08-05 22:32:35 +00:00
András Maróy 5d01cebeab
Implement docker secret handling for SMTP_PASSWORD (#1471)
* Implement docker secret handling for SMTP_PASSWORD

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Use `trim` instead of `rtrim` for `SMTP_PASSWORD_FILE` contents

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Co-authored-by: GitHub Workflow <workflow@github.com>
2021-07-30 12:23:35 +00:00
GitHub Workflow 188db02474 Runs update.sh 2021-07-23 00:26:39 +00:00
J0WI 1a432d98fa
Lock mariadb to 10.5 in examples (fix #1536) (#1539)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-07-18 22:00:36 +00:00
fariszr c769eb86e1
don't expose insecure ports to the public (#1523)
* don't expose insecure ports to public

* don't expose insecure ports to public

Signed-off-by: Fariszr <35614734+fariszr@users.noreply.github.com>
2021-07-18 21:52:26 +00:00
Elias 31b0b0337e
Update stable tag to 21.0.3 (#1538)
The official updater now rolls out 21.0.3 to all 20.0.11 users
2021-07-18 21:45:24 +00:00
Patrizio Bekerle 1e86ea7d4e
Merge pull request #1537 from pbek/master
Lock mariadb to 10.5 (#1536)
2021-07-17 10:45:34 +02:00
Patrizio Bekerle c91097a08e Lock mariadb to 10.5 (#1536) 2021-07-13 21:54:18 +02:00
Patrizio Bekerle d7f1fa7b0d Revert "Lock mariadb to 10.5"
This reverts commit 94a24c2385.
2021-07-13 21:51:14 +02:00
Patrizio Bekerle 94a24c2385
Lock mariadb to 10.5 2021-07-13 21:38:33 +02:00
GitHub Workflow b6b9499252 Runs update.sh 2021-07-06 17:51:01 +00:00
J0WI 9c6af73a76
19 EOL 2021-07-06 17:50:40 +00:00
J0WI 043777ae8d
Update stable to 20.0.11 (#1525)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-07-02 00:29:53 +00:00
GitHub Workflow de10af6ed1 Runs update.sh 2021-07-02 00:26:31 +00:00
J0WI 62a46a6c4d
Alpine 3.14 (#1521)
* Update keyserver

https://github.com/docker-library/faq/pull/23

* Alpine 3.14
2021-06-27 15:23:11 +00:00
J0WI a92ea90731
Update nginx.conf (#1517)
https://github.com/nextcloud/documentation/blob/master/admin_manual/installation/nginx-root.conf.sample
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-06-27 15:14:11 +00:00
GitHub Workflow 80171fb7c9 Runs update.sh 2021-06-18 00:27:13 +00:00
GitHub Workflow 05026b029d Runs update.sh 2021-05-21 12:08:35 +00:00
Thomas131 3cd32ef5bb
Push stable channel to 20.0.10 (#1498)
Signed-off-by: Thomas131 <t@t131.us.to>
2021-05-21 12:08:13 +00:00
GitHub Workflow 7cc3dcac75 Runs update.sh 2021-05-21 00:27:27 +00:00
J0WI def2eeae13
typo 2021-04-28 14:57:30 +00:00
GitHub Workflow f0ca2b56e8 Runs update.sh 2021-04-27 15:02:03 +00:00
0x47 83bd162c7a
Fix broken smtp.config.php file (#1482)
The current `smtp.config.php` file does not work as advertised in the documentation. Both `MAIL_FROM_ADDRESS` and `MAIL_DOMAIN` should be optional as the Nextcloud instance may use multiple _from addresses_ like no-reply@example.com or passwordreset-no-reply@example.com (or similar). It may also just use the domain name from the instance instead of a configured one.

I tested this PR on NC 21 as I don't have access to the previous versions at the moment. I propose to leave NC 19 annd 20 as they are and to continue with this `smtp.config.php` from version 21 forward.

Signed-off-by: 0x47 <0x47@users.noreply.github.com>
2021-04-27 15:01:39 +00:00
J0WI ac9316073c
Add link for Nextcloud issues (#1486) 2021-04-26 18:36:02 +00:00
J0WI e8fc118c40
Add issue template (#1485) 2021-04-26 18:28:48 +00:00
J0WI 953ebac32b
Reduce examples (#1484) 2021-04-26 17:15:37 +00:00
J0WI 45abf54d60
Drop prereleases (#1412) 2021-04-26 17:15:28 +00:00
Florian Friedrich ede3bdc0cc
Update stable tag to 20.0.9 (#1470)
Signed-off-by: Florian Friedrich <ffried@me.com>
2021-04-09 11:32:17 +00:00
GitHub Workflow 3235316659 Runs update.sh 2021-04-09 00:27:41 +00:00
Fabian Eisinger 6b4745de27
Fix typo (#1468)
The environment variable for MYSQL_DATABASE was named MYSQL_DB in chapter "Docker Secrets".

The typo probably happened because of inconsistent naming of MYSQL_DATABSE vs POSTGRES_DB.
2021-04-06 14:12:07 +00:00
GitHub Workflow 01e6c71dd5 Runs update.sh 2021-04-02 00:31:35 +00:00
GitHub Workflow d192631347 Runs update.sh 2021-03-27 01:01:22 +00:00
Philipp a15c755399
Add "legacy_auth" option for S3 object stores (#1444)
* Add "legacy_auth" option for S3 object stores

Signed-off-by: Philipp <admin@philipp.info>

* Update .config/s3.config.php

Co-authored-by: J0WI <J0WI@users.noreply.github.com>

Co-authored-by: J0WI <J0WI@users.noreply.github.com>
2021-03-27 01:01:00 +00:00
GitHub Workflow 031ee346eb Runs update.sh 2021-03-24 23:07:51 +00:00
J0WI b4799f5fc5
Cleanup pear cache (#1458) 2021-03-24 23:07:30 +00:00
Guillot Julien 314dfb4cda
Fixed incorrect environment variable (#1446)
Replaced incorrect environment variable name `OBJECTSTORE_SWIFT_SERVICE_REGION` by `OBJECTSTORE_SWIFT_REGION`.
As visible in f1ca6dbfab/19.0/fpm/config/swift.config.php (L25), configu read `OBJECTSTORE_SWIFT_REGION` instead of `OBJECTSTORE_SWIFT_SERVICE_REGION`.
2021-03-24 22:49:29 +00:00
GitHub Workflow 19b28fa638 Runs update.sh 2021-03-24 22:04:12 +00:00
Michael Griego 9b057aafb0
Enable session locking for the redis session handler and use more sane locking configs. (#1364)
Signed-off-by: Mike Griego <mike@griegocentral.com>
2021-03-24 22:03:48 +00:00
GitHub Workflow f1ca6dbfab Runs update.sh 2021-03-04 22:53:44 +00:00
MAbeeTT (Matías Pecchia) dceaf7307c
Update stable tag to 20.0.8 (fixes 1430) (#1431)
Signed-off-by: Matías Pecchia <mabeett@users.noreply.github.com>
2021-03-04 22:53:20 +00:00
GitHub Workflow 59391c541b Runs update.sh 2021-02-25 01:10:10 +00:00
GitHub Workflow 6ef8de9c85 Runs update.sh 2021-02-23 01:09:34 +00:00
Bloody Altair a10ff74b68
Fixed invalid `PHP_INI_MEMORY_LIMIT` variable name (#1415) 2021-02-22 17:12:50 +00:00
johackim 94e751cd97
Add objectPrefix et autocreate environment variables (#1389)
Signed-off-by: johackim <contact@johackim.com>
2021-02-22 17:06:40 +00:00
Tilo Spannagel 8b9ca85ac5
Merge pull request #1383 from Schroedingers-Cat/clearer-migration
Clearer migration documentation
2021-02-20 20:31:25 +01:00
GitHub Workflow d06df6907b Runs update.sh 2021-02-19 13:58:20 +00:00
J0WI 061d860c0e
Implement essential php.ini configuration via ENV (#1379)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
Co-Authored-By: Alexander Sosna <alexander.sosna@credativ.de>
Co-Authored-By: =?UTF-8?q?Alexander=20Gr=C3=BC=C3=9Fung?= <alexander@gruessung-online.de>

Co-authored-by: Alexander Sosna <alexander.sosna@credativ.de>
Co-authored-by: =?UTF-8?q?Alexander=20Gr=C3=BC=C3=9Fung?= <alexander@gruessung-online.de>
2021-02-19 13:57:58 +00:00
GitHub Workflow b6925e9b45 Runs update.sh 2021-02-19 13:38:49 +00:00
Tim 87fa1a4c14
Changed the in #1380 forgotten config file (#1409)
Signed-off-by: BuildTools <tim.tannert@tu-dortmund.de>
2021-02-19 13:38:28 +00:00
GitHub Workflow b769bae69d Runs update.sh 2021-02-19 01:08:40 +00:00
GitHub Workflow 06a21b46b8 Runs update.sh 2021-02-12 01:07:35 +00:00
J0WI 90f09c70ed
Nextcloud 18 EOL (#1377)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-02-09 17:13:40 +00:00
Gabriel Augendre 90b6e28f9e
Update stable to 20.0.7 (#1393)
Signed-off-by: Gabriel Augendre <gabriel@augendre.info>
2021-02-09 17:06:50 +00:00
GitHub Workflow 724e37a033 Runs update.sh 2021-02-05 01:07:19 +00:00
GitHub Workflow eb0d1f9050 Runs update.sh 2021-02-03 01:13:07 +00:00
GitHub Workflow a8239107dd Runs update.sh 2021-02-02 01:20:35 +00:00
GitHub Workflow a6d2840d95 Runs update.sh 2021-02-01 14:41:42 +00:00
J0WI 75a916f458
Alpine 3.13 (#1378)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-02-01 14:38:38 +00:00
GitHub Workflow c4a429bf0c Runs update.sh 2021-01-30 01:21:52 +00:00
GitHub Workflow 680f0e3218 Runs update.sh 2021-01-29 01:22:40 +00:00
J0WI 5a7f35f499
Update stable tag to 20.0.6 2021-01-25 19:47:11 +00:00
GitHub Workflow ae39bb5ebb Runs update.sh 2021-01-25 19:39:55 +00:00
warren-ru 16a3e7598f
Changing of nginx reverse proxy config (#1380)
* Update nginx.conf

* Update nginx.conf

* Update nginx.conf
2021-01-25 19:39:31 +00:00
Schroedingers-Cat 0d4148f9a4 Migration: Clearer distinction between docker cp and system's cp
Signed-off-by: Schroedingers-Cat <6382400+Schroedingers-Cat@users.noreply.github.com>
2021-01-24 17:50:27 +01:00
Schroedingers-Cat d7e6260688 Migration: Add info for copying data including its metadata
Signed-off-by: Schroedingers-Cat <6382400+Schroedingers-Cat@users.noreply.github.com>
2021-01-24 17:05:23 +01:00
Schroedingers-Cat 915e7584b0 Make hierarchy of ordered list clearer by proper indenting
Signed-off-by: Schroedingers-Cat <6382400+Schroedingers-Cat@users.noreply.github.com>
2021-01-24 17:05:23 +01:00
GitHub Workflow 2cbc82dc9f Runs update.sh 2021-01-22 02:05:36 +00:00
GitHub Workflow 8bc92b29b8 Runs update.sh 2021-01-20 02:05:49 +00:00
J0WI 3a3219b192
Update stable tag to 20.0.5 2021-01-14 17:30:16 +00:00
kitkittia b0920f4087
Add text on necessity of all database env-vars in README (#1361)
Signed-off-by: kitkittia <71378354+kitkittia@users.noreply.github.com>
2021-01-14 16:52:10 +00:00
GitHub Workflow aa48d5145f Runs update.sh 2021-01-14 16:51:39 +00:00
Pierre Ozoux fa4a8a857b
Change quotes for consistency. (#1214) 2021-01-14 16:51:15 +00:00
GitHub Workflow 4c9bc58277 Runs update.sh 2021-01-14 16:50:56 +00:00
Péter Bozsó f9699a1d1a
Fix paragraph about reverse proxy setup (#1349) 2021-01-14 16:50:25 +00:00
GitHub Workflow 07ab7b1773 Runs update.sh 2021-01-13 01:56:21 +00:00
GitHub Workflow 5b4755e5c7 Runs update.sh 2021-01-08 16:39:01 +00:00
Bill Mitchell c0a3273cd4
minor typographical edits (#1352)
Signed-off-by: Bill Mitchell <bill@publicrelay.com>
2021-01-08 16:38:37 +00:00
GitHub Workflow 131a681196 Runs update.sh 2021-01-08 01:46:38 +00:00
GitHub Workflow 12747113ea Runs update.sh 2021-01-07 19:03:01 +00:00
Elias d7ea12fd78
update stable tag to 20.0.4 (#1340) 2021-01-07 19:02:35 +00:00
GitHub Workflow e5b568e52f Runs update.sh 2020-12-31 01:39:35 +00:00
GitHub Workflow 711e5caefa Runs update.sh 2020-12-24 01:32:08 +00:00
J0WI b3f7d00d9b
Document Redis secret (#1337)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-12-21 00:21:11 +00:00
J0WI c4a2995631
Minor fixes and typos (#1336)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-12-20 23:47:20 +00:00
GitHub Workflow b23910be92 Runs update.sh 2020-12-20 22:21:11 +00:00
KnallbertLp e2e521023f
enable usage of REDIS_HOST_PASSWORD_FILE (#1325) 2020-12-20 22:20:51 +00:00
Florian Friedrich fe85a0ea08
Update stable tag (#1330) 2020-12-20 22:10:40 +00:00
GitHub Workflow 27b6f389e6 Runs update.sh 2020-12-19 01:20:45 +00:00
GitHub Workflow 689465f7f8 Runs update.sh 2020-12-15 01:14:19 +00:00
GitHub Workflow 47f18243a4 Runs update.sh 2020-12-12 01:13:25 +00:00
GitHub Workflow f87624c6eb Runs update.sh 2020-12-10 01:12:41 +00:00
tetebueno 380c1645eb
Environment variables in docker-compose section (#1316)
* Environment variables in docker-compose section

Docker-compose file in the example was missing database configuration environment variables of the app container, making the stack to use SQLite by default instead of the DB container.

Didn't add `NEXTCLOUD_ADMIN_*` variables since this addresses the DB being configured with SQLite. This still works setting up admin credentials on first NC run.

Signed-off-by: tetebueno <9064236+tetebueno@users.noreply.github.com>

* Fixing FPM version too.

Signed-off-by: tetebueno <9064236+tetebueno@users.noreply.github.com>
2020-12-09 16:44:19 +00:00
GitHub Workflow f28ff5aef5 Runs update.sh 2020-12-08 01:10:44 +00:00
GitHub Workflow 4c40d26223 Runs update.sh 2020-12-04 01:07:14 +00:00
Tilo Spannagel c292b9b2f2
Update stable channel to 19.0.5 2020-11-19 11:52:29 +01:00
GitHub Workflow 62398b5ea0 Runs update.sh 2020-11-19 00:56:43 +00:00
GitHub Workflow 58419d4d9d Runs update.sh 2020-11-17 00:54:35 +00:00
GitHub Workflow 2b75fba733 Runs update.sh 2020-11-13 00:50:32 +00:00
GitHub Workflow 65634abac6 Runs update.sh 2020-11-07 00:36:28 +00:00
stefanprobst b8cc63fb83
fix: empty redis password must be string (#1232) 2020-11-07 00:36:05 +00:00
J0WI 6fd2227a3d
Add GitHub CI badge (#1301)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-11-06 21:06:28 +00:00
Tilo Spannagel 4efaf225b4
Merge pull request #1294 from J0WI/rm17
Remove 17.0
2020-10-30 18:12:26 +01:00
J0WI 83503a43c9 Remove 17.0 2020-10-30 17:26:53 +01:00
GitHub Workflow e95023790c Runs update.sh 2020-10-24 17:52:50 +00:00
GitHub Workflow 5906ddcbe3 Runs update.sh 2020-10-23 01:16:34 +00:00
GitHub Workflow 8dfa8c3cca Runs update.sh 2020-10-20 01:14:16 +00:00
Tilo Spannagel b763515988
Update stable channel to 19.0.4 2020-10-08 17:34:40 +02:00
GitHub Workflow 530edd68aa Runs update.sh 2020-10-08 15:18:57 +00:00
GitHub Workflow d8e5ac1062 Runs update.sh 2020-10-07 01:07:44 +00:00
GitHub Workflow 6ff6bd54f0 Runs update.sh 2020-10-06 01:07:25 +00:00
Tilo Spannagel 5e0d2b2b79
Merge pull request #1256 from nextcloud/tilosp-patch-1
The update-sh should also commit file removals
2020-10-03 18:33:00 +02:00
Tilo Spannagel 6479093245
The update-sh should also commit file removals
For example here 2161012fb8 the 20.0-rc dir is still there.
2020-10-03 18:32:14 +02:00
Tilo Spannagel 5097f16628 Run update.sh
Signed-off-by: Tilo Spannagel <development@tilosp.de>
2020-10-03 11:02:32 +02:00
GitHub Workflow 2161012fb8 Runs update.sh 2020-10-03 08:59:35 +00:00
GitHub Workflow cd8807c0a8 Runs update.sh 2020-10-02 01:04:44 +00:00
Tilo Spannagel 1bec843644
Merge pull request #1253 from nextcloud/remove-production-channel
Remove separate production channel
2020-09-30 23:17:09 +02:00
Tilo Spannagel 9c9e815419 Remove seperate production channel
Signed-off-by: Tilo Spannagel <development@tilosp.de>
2020-09-30 23:02:26 +02:00
Tobias Messner d1d4467e34
Fix typo in README (#1244)
Signed-off-by: Tobias Messner <tobias@zusor.io>
2020-09-25 14:59:32 +00:00
GitHub Workflow ae77b5ab9f Runs update.sh 2020-09-25 01:03:09 +00:00
GitHub Workflow f1b22e0cee Runs update.sh 2020-09-24 06:53:22 +00:00
Adam Jenkins 84c775e440
Adds ability to configure swift object store though environment (#1243)
Signed-off-by: Adam Jenkins <adamjenkins1701@gmail.com>
2020-09-24 08:52:59 +02:00
Tilo Spannagel 0607fe6171
Merge pull request #1248 from tilosp/bot/update
Run update.sh
2020-09-18 16:39:19 +02:00
tilosp-bot df570ee1e3 Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-09-18 14:00:20 +00:00
GitHub Workflow 9225c07b82 Runs update.sh 2020-09-10 17:37:49 +00:00
Tilo Spannagel 323015718b
Update generate-stackbrew-library.sh 2020-09-10 19:37:27 +02:00
Tilo Spannagel d062f5306c
Merge pull request #1245 from tilosp/bot/update
Run update.sh
2020-09-10 16:50:11 +02:00
tilosp-bot c20b15d30c Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-09-10 14:00:21 +00:00
GitHub Workflow d0ee4bc215 Runs update.sh 2020-09-10 00:56:08 +00:00
GitHub Workflow 1e2c9961f7 Runs update.sh 2020-09-05 01:46:19 +00:00
Tilo Spannagel 27587700ee
Merge pull request #1236 from tilosp/bot/update
Run update.sh
2020-09-03 16:39:26 +02:00
tilosp-bot 1627a2cc70 Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-09-03 14:00:20 +00:00
GitHub Workflow 7d01c9607a Runs update.sh 2020-08-29 07:27:16 +00:00
Pierre Ozoux 27c54cdd9e
Adds ability to configure S3 object stores via environment variables (#1227)
* Adds ability to configure S3 object stores via environment variables

closes #1193 #1124 #1134

Co-authored-by: Adam Jenkins <adamjenkins1701@gmail.com>
Co-authored-by: Stephen Cuppett <scuppett@redhat.com>

* Update .config/s3.config.php

Co-authored-by: Adam Jenkins <adamjenkins1701@gmail.com>
Co-authored-by: Stephen Cuppett <scuppett@redhat.com>
2020-08-29 09:26:57 +02:00
GitHub Workflow e6f91b2fbd Runs update.sh 2020-08-28 15:49:13 +00:00
pierreozoux 7a286da8c3 Revert "Adds ability to configure S3 object stores via environment variables"
This reverts commit 47032fddb6.
2020-08-28 17:48:40 +02:00
pierreozoux 488378f8e8 Runs after update.sh workflow.
It also does contain a cron, so no need here.
2020-08-28 15:45:30 +02:00
pierreozoux 54c633c116 Runs update before testing a PR. 2020-08-28 15:45:30 +02:00
pierreozoux bda13d3ef3 Does not fail when there is nothing to commit. 2020-08-28 15:45:30 +02:00
GitHub Workflow 5f3072ea80 Runs update.sh 2020-08-28 13:26:05 +00:00
pierreozoux 47032fddb6 Adds ability to configure S3 object stores via environment variables
closes #1193 #1124 #1134

Co-authored-by: Adam Jenkins <adamjenkins1701@gmail.com>
Co-authored-by: Stephen Cuppett <scuppett@redhat.com>
2020-08-28 15:25:06 +02:00
pierreozoux 1eb77283c1 Run update.sh on PR and on cron.
Signed-off-by: pierreozoux <pierre@ozoux.net>
2020-08-28 15:18:27 +02:00
Guillaume Virlet 83b38c57a6 move stable from NC18 to NC19 and production from NC17 o NC18 [Fix #1175]
Signed-off-by: Guillaume Virlet <github@virlet.org>
2020-08-28 13:48:05 +02:00
Tilo Spannagel 97f0fa6cc3
Merge pull request #1221 from tilosp/bot/update
Run update.sh
2020-08-28 12:15:04 +02:00
tilosp-bot 9faeb26025 Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-08-27 19:55:44 +00:00
Tilo Spannagel 0d84c2e085
Merge pull request #1220 from nextcloud/remove-beta
Remove beta for now
2020-08-27 21:46:23 +02:00
Tilo Spannagel 288f9c0998 Remove beta for now 2020-08-27 21:43:44 +02:00
Tilo Spannagel 079c2519a3
Merge pull request #1216 from tilosp/bot/update
Run update.sh
2020-08-27 21:41:43 +02:00
tilosp-bot 1353c04b9f Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-08-27 15:31:23 +00:00
tilosp-bot e0247dc3cd Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-08-25 18:56:24 +02:00
Tilo Spannagel 65f3f6d167
Merge pull request #1205 from tilosp/bot/update
Run update.sh
2020-08-21 17:38:03 +02:00
tilosp-bot 4afc60d530 Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-08-21 14:00:22 +00:00
tilosp-bot bd4cf887a4 Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-08-20 14:00:22 +00:00
Tilo Spannagel abe8cd69a6
Merge pull request #1192 from J0WI/revert-cmd
Revert "Fix triggering install and update script (#1181)"
2020-07-28 16:59:30 +02:00
J0WI 1e6d0620af Revert "Fix triggering install and update script (#1181)"
This reverts commit de90bed706.
2020-07-28 14:40:22 +02:00
Tilo Spannagel 9bfe454bd4
Merge pull request #1183 from sersoft-gmbh/update_release_channels
Update stable to 18.0.7 and production to 17.0.8
2020-07-27 16:26:27 +02:00
Florian Friedrich 9d5a5a7b57
Update stable and production channels (18.0.7 and 17.0.8 respectively)
Signed-off-by: Florian Friedrich <ffried@me.com>
2020-07-27 16:19:18 +02:00
stackcoder de90bed706
Fix triggering install and update script (#1181)
* Match cmd provided by Dockerfile again with entrypoint.sh

Signed-off-by: stackcoder <stackcoder@gmail.com>

* Fixup README.md

Signed-off-by: stackcoder <stackcoder@gmail.com>
2020-07-26 14:32:24 +00:00
Tilo Spannagel 476e60305b
Merge pull request #1177 from tilosp/bot/update
Update nextcloud to 17.0.8, 18.0.7 and 19.0.1
2020-07-16 10:05:54 +02:00
tilosp-bot 45f3995ab7 Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-07-16 07:22:28 +00:00
tilosp-bot 8c623fd156
Run update.sh (#1170)
* Run update.sh

Signed-off-by: tilosp-bot <git-bot@tilosp.de>

* Run update.sh

Signed-off-by: tilosp-bot <git-bot@tilosp.de>

* Run update.sh

Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-07-14 20:32:04 +00:00
Tilo Spannagel baebdfefd9
Replace Travis CI with GitHub actions (#939)
* Test build images using github actions

Signed-off-by: Tilo Spannagel <development@tilosp.de>

* Check for Changes by update.sh using github actions

Signed-off-by: Tilo Spannagel <development@tilosp.de>

* Remove travis.yml

Signed-off-by: Tilo Spannagel <development@tilosp.de>
2020-06-30 00:12:41 +00:00
Tilo Spannagel 1e70224108
Merge pull request #1161 from J0WI/alpine-3.12
Upgrade Alpine to 3.12
2020-06-30 01:11:41 +02:00
Tilo Spannagel f9ef31431d
Fix removing of GNUPGHOME dir (#1169)
* Fix removing of GNUPGHOME dir

Signed-off-by: Tilo Spannagel <development@tilosp.de>

* Run update.sh

Signed-off-by: Tilo Spannagel <development@tilosp.de>
2020-06-29 23:05:14 +00:00
Tilo Spannagel f1998803d7
Merge pull request #1167 from doc75/update-version
update version to latest (18.0.6 and 17.0.7)
2020-06-29 15:27:01 +02:00
Guillaume Virlet 2e15b8bca5 update version to latest (18.0.6 and 17.0.7)
Signed-off-by: Guillaume Virlet <github@virlet.org>
2020-06-28 11:37:27 +02:00
J0WI 84b26184c5 Upgrade Alpine to 3.12
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-06-21 16:02:42 +02:00
Tilo Spannagel c135f7ef60
Merge pull request #1147 from J0WI/rm-16
Remove EOL 16.0
2020-06-09 15:47:10 +02:00
J0WI 2ad4252386 Remove EOL 16.0
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-06-09 15:28:58 +02:00
J0WI 3ac6fde8d6
Remove db prefix option (#1131)
* Remove db prefix option

Signed-off-by: J0WI <J0WI@users.noreply.github.com>

* Upgrade to 18.0.6

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-06-09 13:26:33 +00:00
J0WI 0599d1022c
Upgrade PHP Redis to 5.x for 19.0 (#1100)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-06-04 22:03:30 +00:00
tilosp-bot a229b17bca
Run update.sh (#1132)
* Run update.sh

Signed-off-by: tilosp-bot <git-bot@tilosp.de>

* Run update.sh

Signed-off-by: tilosp-bot <git-bot@tilosp.de>

* Run update.sh

Signed-off-by: tilosp-bot <git-bot@tilosp.de>

* Add bmath for 19.0 (fix ##1122 and #1137)

Signed-off-by: J0WI <J0WI@users.noreply.github.com>

Co-authored-by: J0WI <J0WI@users.noreply.github.com>
2020-06-04 20:50:41 +00:00
J0WI ba1500b05e
Upgrade PHP to 7.4 for 19.0 (#1108)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-05-23 22:34:08 +00:00
Tilo Spannagel ccdf46609f
Merge pull request #1123 from tilosp/bot/update
Run update.sh
2020-05-22 14:33:39 +02:00
tilosp-bot 8335bf8618 Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-05-21 14:00:18 +00:00
Tilo Spannagel 7f0bc5ae06
Merge pull request #1118 from tilosp/bot/update
Update nextcloud to 19.0.0RC2
2020-05-19 00:05:05 +02:00
tilosp-bot aa191711d4 Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-05-14 14:00:18 +00:00
tilosp-bot 05c3a27d34
Run update.sh (#1111)
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-05-08 11:18:52 +00:00
J0WI a45bc2a2ae
Replace libressl with openssl (#1098)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-05-05 15:57:25 +00:00
tilosp-bot 764c79de08
Run update.sh (#1106)
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-05-05 15:56:59 +00:00
Tilo Spannagel a414643f60
Merge pull request #1097 from tilosp/bot/update
Update nextcloud to 19.0.0beta6
2020-05-01 16:45:31 +02:00
Tilo Spannagel 0b6a0991bf
Fix bashbrew url
Signed-off-by: Tilo Spannagel <development@tilosp.de>
2020-04-30 21:30:05 +02:00
tilosp-bot dfbb2f6511 Run update.sh
Signed-off-by: tilosp-bot <git-bot@tilosp.de>
2020-04-30 19:23:06 +00:00
Tilo Spannagel d6df1446c9
Update release channels 2020-04-23 16:41:03 +02:00
Tilo Spannagel 1166763a8c
Merge pull request #1084 from tilosp/bot/update
Update nextcloud to 16.0.10, 17.0.6, 18.0.4 and 19.0.0beta5
2020-04-23 15:07:01 +02:00
J0WI 6b6c68cabf
Serve mp4 and webm files directly in nginx (#1076)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-04-22 21:16:45 +00:00
278 changed files with 6437 additions and 6158 deletions

View File

@ -1,15 +1,15 @@
<?php
$CONFIG = array (
"apps_paths" => array (
'apps_paths' => array (
0 => array (
"path" => OC::$SERVERROOT."/apps",
"url" => "/apps",
"writable" => false,
'path' => OC::$SERVERROOT.'/apps',
'url' => '/apps',
'writable' => false,
),
1 => array (
"path" => OC::$SERVERROOT."/custom_apps",
"url" => "/custom_apps",
"writable" => true,
'path' => OC::$SERVERROOT.'/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
);

View File

@ -3,29 +3,39 @@
$autoconfig_enabled = false;
if (getenv('SQLITE_DATABASE')) {
$AUTOCONFIG["dbtype"] = "sqlite";
$AUTOCONFIG["dbname"] = getenv('SQLITE_DATABASE');
$AUTOCONFIG['dbtype'] = 'sqlite';
$AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE');
$autoconfig_enabled = true;
} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) {
$AUTOCONFIG['dbtype'] = 'mysql';
$AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('MYSQL_DATABASE_FILE')));
$AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('MYSQL_USER_FILE')));
$AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('MYSQL_PASSWORD_FILE')));
$AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST');
$autoconfig_enabled = true;
} elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) {
$AUTOCONFIG["dbtype"] = "mysql";
$AUTOCONFIG["dbname"] = getenv('MYSQL_DATABASE');
$AUTOCONFIG["dbuser"] = getenv('MYSQL_USER');
$AUTOCONFIG["dbpass"] = getenv('MYSQL_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('MYSQL_HOST');
$AUTOCONFIG['dbtype'] = 'mysql';
$AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE');
$AUTOCONFIG['dbuser'] = getenv('MYSQL_USER');
$AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD');
$AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST');
$autoconfig_enabled = true;
} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) {
$AUTOCONFIG['dbtype'] = 'pgsql';
$AUTOCONFIG['dbname'] = trim(file_get_contents(getenv('POSTGRES_DB_FILE')));
$AUTOCONFIG['dbuser'] = trim(file_get_contents(getenv('POSTGRES_USER_FILE')));
$AUTOCONFIG['dbpass'] = trim(file_get_contents(getenv('POSTGRES_PASSWORD_FILE')));
$AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST');
$autoconfig_enabled = true;
} elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) {
$AUTOCONFIG["dbtype"] = "pgsql";
$AUTOCONFIG["dbname"] = getenv('POSTGRES_DB');
$AUTOCONFIG["dbuser"] = getenv('POSTGRES_USER');
$AUTOCONFIG["dbpass"] = getenv('POSTGRES_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('POSTGRES_HOST');
$AUTOCONFIG['dbtype'] = 'pgsql';
$AUTOCONFIG['dbname'] = getenv('POSTGRES_DB');
$AUTOCONFIG['dbuser'] = getenv('POSTGRES_USER');
$AUTOCONFIG['dbpass'] = getenv('POSTGRES_PASSWORD');
$AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST');
$autoconfig_enabled = true;
}
if ($autoconfig_enabled) {
if (getenv('NEXTCLOUD_TABLE_PREFIX')) {
$AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX');
}
$AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data";
$AUTOCONFIG['directory'] = getenv('NEXTCLOUD_DATA_DIR') ?: '/var/www/html/data';
}

View File

@ -1,11 +1,11 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
$CONFIG = array(
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'password' => getenv('REDIS_HOST_PASSWORD'),
'password' => (string) getenv('REDIS_HOST_PASSWORD'),
),
);

View File

@ -9,6 +9,11 @@ if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteProtocol;
}
$overwriteCliUrl = getenv('OVERWRITECLIURL');
if ($overwriteCliUrl) {
$CONFIG['overwrite.cli.url'] = $overwriteCliUrl;
}
$overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwriteWebRoot;

48
.config/s3.config.php Normal file
View File

@ -0,0 +1,48 @@
<?php
if (getenv('OBJECTSTORE_S3_BUCKET')) {
$use_ssl = getenv('OBJECTSTORE_S3_SSL');
$use_path = getenv('OBJECTSTORE_S3_USEPATH_STYLE');
$use_legacyauth = getenv('OBJECTSTORE_S3_LEGACYAUTH');
$autocreate = getenv('OBJECTSTORE_S3_AUTOCREATE');
$CONFIG = array(
'objectstore' => array(
'class' => '\OC\Files\ObjectStore\S3',
'arguments' => array(
'bucket' => getenv('OBJECTSTORE_S3_BUCKET'),
'region' => getenv('OBJECTSTORE_S3_REGION') ?: '',
'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '',
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true,
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true,
// required for some non Amazon S3 implementations
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions
'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false'
)
)
);
if (getenv('OBJECTSTORE_S3_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_KEY_FILE'))) {
$CONFIG['objectstore']['arguments']['key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_KEY_FILE')));
} elseif (getenv('OBJECTSTORE_S3_KEY')) {
$CONFIG['objectstore']['arguments']['key'] = getenv('OBJECTSTORE_S3_KEY');
} else {
$CONFIG['objectstore']['arguments']['key'] = '';
}
if (getenv('OBJECTSTORE_S3_SECRET_FILE') && file_exists(getenv('OBJECTSTORE_S3_SECRET_FILE'))) {
$CONFIG['objectstore']['arguments']['secret'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SECRET_FILE')));
} elseif (getenv('OBJECTSTORE_S3_SECRET')) {
$CONFIG['objectstore']['arguments']['secret'] = getenv('OBJECTSTORE_S3_SECRET');
} else {
$CONFIG['objectstore']['arguments']['secret'] = '';
}
if (getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE') && file_exists(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE'))) {
$CONFIG['objectstore']['arguments']['sse_c_key'] = trim(file_get_contents(getenv('OBJECTSTORE_S3_SSE_C_KEY_FILE')));
} elseif (getenv('OBJECTSTORE_S3_SSE_C_KEY')) {
$CONFIG['objectstore']['arguments']['sse_c_key'] = getenv('OBJECTSTORE_S3_SSE_C_KEY');
}
}

View File

@ -5,11 +5,18 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN'))
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) {
$CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE')));
} elseif (getenv('SMTP_PASSWORD')) {
$CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD');
} else {
$CONFIG['mail_smtppassword'] = '';
}
}

31
.config/swift.config.php Normal file
View File

@ -0,0 +1,31 @@
<?php
if (getenv('OBJECTSTORE_SWIFT_URL')) {
$autocreate = getenv('OBJECTSTORE_SWIFT_AUTOCREATE');
$CONFIG = array(
'objectstore' => [
'class' => 'OC\\Files\\ObjectStore\\Swift',
'arguments' => [
'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false',
'user' => [
'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'),
'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'),
'domain' => [
'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default',
],
],
'scope' => [
'project' => [
'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'),
'domain' => [
'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default',
],
],
],
'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift',
'region' => getenv('OBJECTSTORE_SWIFT_REGION'),
'url' => getenv('OBJECTSTORE_SWIFT_URL'),
'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'),
]
]
);
}

View File

@ -0,0 +1,4 @@
<?php
$CONFIG = array (
'upgrade.disable-web' => true,
);

View File

@ -18,14 +18,17 @@ Example | Description
[smb](https://github.com/nextcloud/docker/tree/master/.examples/dockerfiles/smb) | adds dependencies required to use smb shares
[full](https://github.com/nextcloud/docker/tree/master/.examples/dockerfiles/full) | adds dependencies for ALL optional packages and cron functionality via supervisor (as in the `cron` example Dockerfile).
### cron
NOTE: [this container must run as root or `cron.php` will not run](https://github.com/nextcloud/docker/issues/1899).
### full
The `full` Dockerfile example adds dependencies for all optional packages suggested by nextcloud that may be needed for some features (e.g. Video Preview Generation), as stated in the [Administration Manual](https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html).
The `full` Dockerfile example adds dependencies for all optional packages suggested by nextcloud that may be needed for some features (e.g. Video Preview Generation), as stated in the [Administration Manual](https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html).
NOTE: The Dockerfile does not install the LibreOffice package (line is commented), because it would increase the generated Image size by approximately 500 MB. In order to install it, simply uncomment the appropriate line in the Dockerfile.
NOTE: Per default, only previews for BMP, GIF, JPEG, MarkDown, MP3, PNG, TXT, and XBitmap Files are generated. The configuration of the preview generation can be done in config.php, as explained in the [Administration Manual](https://docs.nextcloud.com/server/12/admin_manual/configuration_server/config_sample_php_parameters.html#previews)
NOTE: Per default, only previews for BMP, GIF, JPEG, MarkDown, MP3, PNG, TXT, and XBitmap Files are generated. The configuration of the preview generation can be done in config.php, as explained in the [Administration Manual](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#previews)
NOTE: Nextcloud recommends [disabling preview generation](https://docs.nextcloud.com/server/12/admin_manual/configuration_server/harden_server.html?highlight=enabledpreviewproviders#disable-preview-image-generation) for high security deployments, as preview generation opens your nextcloud instance to new possible attack vectors.
NOTE: Nextcloud recommends [disabling preview generation](https://docs.nextcloud.com/server/latest/admin_manual/installation/harden_server.html#disable-preview-image-generation) for high security deployments, as preview generation opens your nextcloud instance to new possible attack vectors.
The required steps for each optional/recommended package that is not already in the Nextcloud image are listed here, so that the Dockerfile can easily be modified to only install the needed extra packages. Simply remove the steps for the unwanted packages from the Dockerfile.
@ -68,7 +71,7 @@ The following Dockerfile commands are also necessary for a sucessfull cron insta
In `docker-compose` additional services are bundled to create a complete nextcloud installation. The examples are designed to run out-of-the-box.
Before running the examples you have to modify the `db.env` and `docker-compose.yml` file and fill in your custom information.
The docker-compose examples make heavily use of dereived Dockerfiles to add configuration files into the containers. This way they should also work on remote docker systems as _Docker for Windows_. When running docker-compose on the same host as the docker daemon, another possibility would be to simply mount the files in the volumes section in the `docker-compose.yml` file.
The docker-compose examples make heavily use of derived Dockerfiles to add configuration files into the containers. This way they should also work on remote docker systems as _Docker for Windows_. When running docker-compose on the same host as the docker daemon, another possibility would be to simply mount the files in the volumes section in the `docker-compose.yml` file.
### insecure
@ -91,7 +94,7 @@ If you want to update your installation to a newer version of nextcloud, repeat
The nginx proxy adds a proxy layer between nextcloud and the internet. The proxy is designed to serve multiple sites on the same host machine.
The advantage in adding this layer is the ability to add a container for [Let's Encrypt](https://letsencrypt.org/) certificate handling.
This combination of the [jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy) and [jrcs/docker-letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion) containers creates a fully automated https encryption of the nextcloud installation without worrying about certificate generation, validation or renewal.
This combination of the [nginxproxy/nginx-proxy](https://github.com/nginx-proxy/nginx-proxy) and [nginxproxy/acme-companion](https://github.com/nginx-proxy/acme-companion) containers creates a fully automated https encryption of the nextcloud installation without worrying about certificate generation, validation or renewal.
**This setup only works with a valid domain name on a server that is reachable from the internet.**

View File

@ -1,3 +0,0 @@
MYSQL_PASSWORD=
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud

View File

@ -1,47 +0,0 @@
version: '3'
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:apache
restart: always
ports:
- 8080:80
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
cron:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
- redis
volumes:
db:
nextcloud:

View File

@ -1,3 +0,0 @@
MYSQL_PASSWORD=
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud

View File

@ -1,55 +0,0 @@
version: '3'
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
web:
build: ./web
restart: always
ports:
- 8080:80
volumes:
- nextcloud:/var/www/html:ro
depends_on:
- app
cron:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
- redis
volumes:
db:
nextcloud:

View File

@ -1,3 +0,0 @@
FROM nginx:alpine
COPY nginx.conf /etc/nginx/nginx.conf

View File

@ -1,168 +0,0 @@
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
upstream php-handler {
server app:9000;
}
server {
listen 80;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/html;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# The following 2 rules are only needed for the user_webfinger app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
# The following rule is only needed for the Social app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
location = /.well-known/carddav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
# set max upload size
client_max_body_size 10G;
fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
#pagespeed off;
location / {
rewrite ^ /index.php;
}
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
deny all;
}
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
# fastcgi_param HTTPS on;
# Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
# Enable pretty urls
fastcgi_param front_controller_active true;
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
try_files $uri/ =404;
index index.php;
}
# Adding the cache control header for js, css and map files
# Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to
# have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read into
# this topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Optional: Don't log access to assets
access_log off;
}
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
try_files $uri /index.php$request_uri;
# Optional: Don't log access to other assets
access_log off;
}
}
}

View File

@ -2,29 +2,47 @@ version: '3'
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
image: mariadb:10.6
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
- db:/var/lib/mysql:Z
environment:
- MYSQL_ROOT_PASSWORD=
- MARIADB_AUTO_UPGRADE=1
- MARIADB_DISABLE_UPGRADE_BACKUP=1
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:apache
restart: always
ports:
- 8080:80
- 127.0.0.1:8080:80
volumes:
- nextcloud:/var/www/html
- nextcloud:/var/www/html:z
environment:
- MYSQL_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
cron:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
depends_on:
- db
- redis
volumes:
db:

View File

@ -2,38 +2,56 @@ version: '3'
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
image: mariadb:10.6
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
- db:/var/lib/mysql:Z
environment:
- MYSQL_ROOT_PASSWORD=
- MARIADB_AUTO_UPGRADE=1
- MARIADB_DISABLE_UPGRADE_BACKUP=1
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
- nextcloud:/var/www/html:z
environment:
- MYSQL_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
web:
build: ./web
restart: always
ports:
- 8080:80
- 127.0.0.1:8080:80
volumes:
- nextcloud:/var/www/html:ro
- nextcloud:/var/www/html:z,ro
depends_on:
- app
cron:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
depends_on:
- db
- redis
volumes:
db:
nextcloud:

View File

@ -10,7 +10,7 @@ events {
http {
include /etc/nginx/mime.types;
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
@ -22,8 +22,17 @@ http {
sendfile on;
#tcp_nopush on;
# Prevent nginx HTTP Server Detection
server_tokens off;
keepalive_timeout 65;
# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
"" "";
default "immutable";
}
#gzip on;
upstream php-handler {
@ -33,136 +42,164 @@ http {
server {
listen 80;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/html;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# The following 2 rules are only needed for the user_webfinger app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
# The following rule is only needed for the Social app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
location = /.well-known/carddav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
# set max upload size
client_max_body_size 10G;
# set max upload size and increase upload timeout:
client_max_body_size 512M;
client_body_timeout 300s;
fastcgi_buffers 64 4K;
# The settings allows you to optimize the HTTP2 bandwidth.
# See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/
# for tuning hints
client_body_buffer_size 512k;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
# Pagespeed is not supported by Nextcloud, so if your server is built
# with the `ngx_pagespeed` module, uncomment this line to disable it.
#pagespeed off;
location / {
rewrite ^ /index.php;
# HTTP response headers borrowed from Nextcloud `.htaccess`
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "noindex, nofollow" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/html;
# Specify how to handle directories -- specifying `/index.php$request_uri`
# here as the fallback means that Nginx always exhibits the desired behaviour
# when a client requests a path that corresponds to a directory that exists
# on the server. In particular, if that directory contains an index.php file,
# that file is correctly served; if it doesn't, then the request is passed to
# the front-end controller. This consistent behaviour means that we don't need
# to specify custom rules for certain paths (e.g. images and other assets,
# `/updater`, `/ocm-provider`, `/ocs-provider`), and thus
# `try_files $uri $uri/ /index.php$request_uri`
# always provides the desired behaviour.
index index.php index.html /index.php$request_uri;
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
location = / {
if ( $http_user_agent ~ ^DavClnt ) {
return 302 /remote.php/webdav/$is_args$args;
}
}
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
deny all;
}
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
# Make a regex exception for `/.well-known` so that clients can still
# access it despite the existence of the regex rule
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
# for `/.well-known`.
location ^~ /.well-known {
# The rules in this block are an adaptation of the rules
# in `.htaccess` that concern `/.well-known`.
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
# Let Nextcloud's API for `/.well-known` URIs handle all other
# requests by passing them to the front-end controller.
return 301 /index.php$request_uri;
}
# Rules borrowed from `.htaccess` to hide certain paths from clients
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
# which handle static assets (as seen below). If this block is not declared first,
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
# to the URI, resulting in a HTTP 500 error response.
location ~ \.php(?:$|/) {
# Required for legacy support
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
# fastcgi_param HTTPS on;
#fastcgi_param HTTPS on;
# Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
# Enable pretty urls
fastcgi_param front_controller_active true;
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_max_temp_file_size 0;
}
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
try_files $uri/ =404;
index index.php;
}
# Adding the cache control header for js, css and map files
# Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
# Javascript mimetype fixes for nginx
# Note: The block below should be removed, and the js|mjs section should be
# added to the block below this one. This is a temporary fix until Nginx
# upstream fixes the js mime-type
location ~* \.(?:js|mjs)$ {
types {
text/javascript js mjs;
}
default_type "text/javascript";
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to
# have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read into
# this topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Optional: Don't log access to assets
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
access_log off;
}
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
# Serve static files
location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
try_files $uri /index.php$request_uri;
# Optional: Don't log access to other assets
access_log off;
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
access_log off; # Optional: Don't log access to assets
location ~ \.wasm$ {
default_type application/wasm;
}
}
location ~ \.woff2?$ {
try_files $uri /index.php$request_uri;
expires 7d; # Cache-Control policy borrowed from `.htaccess`
access_log off; # Optional: Don't log access to assets
}
# Rule borrowed from `.htaccess`
location /remote {
return 301 /remote.php$request_uri;
}
location / {
try_files $uri $uri/ /index.php$request_uri;
}
}
}

View File

@ -5,23 +5,39 @@ services:
image: postgres:alpine
restart: always
volumes:
- db:/var/lib/postgresql/data
- db:/var/lib/postgresql/data:Z
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:apache
restart: always
ports:
- 8080:80
- 127.0.0.1:8080:80
volumes:
- nextcloud:/var/www/html
- nextcloud:/var/www/html:z
environment:
- POSTGRES_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
cron:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
depends_on:
- db
- redis
volumes:
db:

View File

@ -5,32 +5,48 @@ services:
image: postgres:alpine
restart: always
volumes:
- db:/var/lib/postgresql/data
- db:/var/lib/postgresql/data:z
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
- nextcloud:/var/www/html:z
environment:
- POSTGRES_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
web:
build: ./web
restart: always
ports:
- 8080:80
- 127.0.0.1:8080:80
volumes:
- nextcloud:/var/www/html:ro
- nextcloud:/var/www/html:z,ro
depends_on:
- app
cron:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
depends_on:
- db
- redis
volumes:
db:
nextcloud:

View File

@ -10,7 +10,7 @@ events {
http {
include /etc/nginx/mime.types;
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
@ -22,8 +22,17 @@ http {
sendfile on;
#tcp_nopush on;
# Prevent nginx HTTP Server Detection
server_tokens off;
keepalive_timeout 65;
# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
"" "";
default "immutable";
}
#gzip on;
upstream php-handler {
@ -33,136 +42,163 @@ http {
server {
listen 80;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/html;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# The following 2 rules are only needed for the user_webfinger app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
# The following rule is only needed for the Social app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
location = /.well-known/carddav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
# set max upload size
client_max_body_size 10G;
# set max upload size and increase upload timeout:
client_max_body_size 512M;
client_body_timeout 300s;
fastcgi_buffers 64 4K;
# The settings allows you to optimize the HTTP2 bandwidth.
# See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/
# for tuning hints
client_body_buffer_size 512k;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
# Pagespeed is not supported by Nextcloud, so if your server is built
# with the `ngx_pagespeed` module, uncomment this line to disable it.
#pagespeed off;
location / {
rewrite ^ /index.php;
# HTTP response headers borrowed from Nextcloud `.htaccess`
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "noindex, nofollow" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/html;
# Specify how to handle directories -- specifying `/index.php$request_uri`
# here as the fallback means that Nginx always exhibits the desired behaviour
# when a client requests a path that corresponds to a directory that exists
# on the server. In particular, if that directory contains an index.php file,
# that file is correctly served; if it doesn't, then the request is passed to
# the front-end controller. This consistent behaviour means that we don't need
# to specify custom rules for certain paths (e.g. images and other assets,
# `/updater`, `/ocm-provider`, `/ocs-provider`), and thus
# `try_files $uri $uri/ /index.php$request_uri`
# always provides the desired behaviour.
index index.php index.html /index.php$request_uri;
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
location = / {
if ( $http_user_agent ~ ^DavClnt ) {
return 302 /remote.php/webdav/$is_args$args;
}
}
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
deny all;
}
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
# Make a regex exception for `/.well-known` so that clients can still
# access it despite the existence of the regex rule
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
# for `/.well-known`.
location ^~ /.well-known {
# The rules in this block are an adaptation of the rules
# in `.htaccess` that concern `/.well-known`.
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
# Let Nextcloud's API for `/.well-known` URIs handle all other
# requests by passing them to the front-end controller.
return 301 /index.php$request_uri;
}
# Rules borrowed from `.htaccess` to hide certain paths from clients
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
# which handle static assets (as seen below). If this block is not declared first,
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
# to the URI, resulting in a HTTP 500 error response.
location ~ \.php(?:$|/) {
# Required for legacy support
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
# fastcgi_param HTTPS on;
#fastcgi_param HTTPS on;
# Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
# Enable pretty urls
fastcgi_param front_controller_active true;
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_max_temp_file_size 0;
}
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
try_files $uri/ =404;
index index.php;
}
# Adding the cache control header for js, css and map files
# Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
# Javascript mimetype fixes for nginx
# Note: The block below should be removed, and the js|mjs section should be
# added to the block below this one. This is a temporary fix until Nginx
# upstream fixes the js mime-type
location ~* \.(?:js|mjs)$ {
types {
text/javascript js mjs;
}
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to
# have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read into
# this topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Optional: Don't log access to assets
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
access_log off;
}
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
# Serve static files
location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
try_files $uri /index.php$request_uri;
# Optional: Don't log access to other assets
access_log off;
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
access_log off; # Optional: Don't log access to assets
location ~ \.wasm$ {
default_type application/wasm;
}
}
location ~ \.woff2?$ {
try_files $uri /index.php$request_uri;
expires 7d; # Cache-Control policy borrowed from `.htaccess`
access_log off; # Optional: Don't log access to assets
}
# Rule borrowed from `.htaccess`
location /remote {
return 301 /remote.php$request_uri;
}
location / {
try_files $uri $uri/ /index.php$request_uri;
}
}
}

View File

@ -1,3 +0,0 @@
MYSQL_PASSWORD=
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud

View File

@ -1,78 +0,0 @@
version: '3'
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=
env_file:
- db.env
app:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_HOST=db
env_file:
- db.env
depends_on:
- db
web:
build: ./web
restart: always
volumes:
- nextcloud:/var/www/html:ro
environment:
- VIRTUAL_HOST=
depends_on:
- app
networks:
- proxy-tier
- default
proxy:
build: ./proxy
restart: always
ports:
- 80:80
- 443:443
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
depends_on:
- omgwtfssl
omgwtfssl:
image: paulczar/omgwtfssl
restart: "no"
volumes:
- certs:/certs
environment:
- SSL_SUBJECT=servhostname.local
- CA_SUBJECT=my@example.com
- SSL_KEY=/certs/servhostname.local.key
- SSL_CSR=/certs/servhostname.local.csr
- SSL_CERT=/certs/servhostname.local.crt
networks:
- proxy-tier
volumes:
db:
nextcloud:
certs:
vhost.d:
html:
networks:
proxy-tier:

View File

@ -1,3 +0,0 @@
FROM jwilder/nginx-proxy:alpine
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf

View File

@ -1,2 +0,0 @@
client_max_body_size 10G;
proxy_request_buffering off;

View File

@ -1,3 +0,0 @@
FROM nginx:alpine
COPY nginx.conf /etc/nginx/nginx.conf

View File

@ -1,173 +0,0 @@
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
set_real_ip_from 10.0.0.0/8;
set_real_ip_from 172.16.0.0/12;
set_real_ip_from 192.168.0.0/16;
real_ip_header X-Real-IP;
#gzip on;
upstream php-handler {
server app:9000;
}
server {
listen 80;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/html;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# The following 2 rules are only needed for the user_webfinger app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
# The following rule is only needed for the Social app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
location = /.well-known/carddav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
# set max upload size
client_max_body_size 10G;
fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
#pagespeed off;
location / {
rewrite ^ /index.php;
}
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
deny all;
}
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
# fastcgi_param HTTPS on;
# Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
# Enable pretty urls
fastcgi_param front_controller_active true;
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
try_files $uri/ =404;
index index.php;
}
# Adding the cache control header for js, css and map files
# Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to
# have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read into
# this topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Optional: Don't log access to assets
access_log off;
}
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
try_files $uri /index.php$request_uri;
# Optional: Don't log access to other assets
access_log off;
}
}
}

View File

@ -1,3 +0,0 @@
MYSQL_PASSWORD=
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud

View File

@ -1,86 +0,0 @@
version: '3'
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html
environment:
- VIRTUAL_HOST=
- LETSENCRYPT_HOST=
- LETSENCRYPT_EMAIL=
- MYSQL_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
networks:
- proxy-tier
- default
cron:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
- redis
proxy:
build: ./proxy
restart: always
ports:
- 80:80
- 443:443
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- proxy-tier
depends_on:
- proxy
volumes:
db:
nextcloud:
certs:
vhost.d:
html:
networks:
proxy-tier:

View File

@ -1,3 +0,0 @@
FROM jwilder/nginx-proxy:alpine
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf

View File

@ -1,2 +0,0 @@
client_max_body_size 10G;
proxy_request_buffering off;

View File

@ -1,3 +0,0 @@
MYSQL_PASSWORD=
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud

View File

@ -1,95 +0,0 @@
version: '3'
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
web:
build: ./web
restart: always
volumes:
- nextcloud:/var/www/html:ro
environment:
- VIRTUAL_HOST=
- LETSENCRYPT_HOST=
- LETSENCRYPT_EMAIL=
depends_on:
- app
networks:
- proxy-tier
- default
cron:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
- redis
proxy:
build: ./proxy
restart: always
ports:
- 80:80
- 443:443
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- proxy-tier
depends_on:
- proxy
volumes:
db:
nextcloud:
certs:
vhost.d:
html:
networks:
proxy-tier:

View File

@ -1,3 +0,0 @@
FROM jwilder/nginx-proxy:alpine
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf

View File

@ -1,2 +0,0 @@
client_max_body_size 10G;
proxy_request_buffering off;

View File

@ -1,3 +0,0 @@
FROM nginx:alpine
COPY nginx.conf /etc/nginx/nginx.conf

View File

@ -1,173 +0,0 @@
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
set_real_ip_from 10.0.0.0/8;
set_real_ip_from 172.16.0.0/12;
set_real_ip_from 192.168.0.0/16;
real_ip_header X-Real-IP;
#gzip on;
upstream php-handler {
server app:9000;
}
server {
listen 80;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/html;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# The following 2 rules are only needed for the user_webfinger app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
# The following rule is only needed for the Social app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
location = /.well-known/carddav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
# set max upload size
client_max_body_size 10G;
fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
#pagespeed off;
location / {
rewrite ^ /index.php;
}
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
deny all;
}
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
# fastcgi_param HTTPS on;
# Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
# Enable pretty urls
fastcgi_param front_controller_active true;
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
try_files $uri/ =404;
index index.php;
}
# Adding the cache control header for js, css and map files
# Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to
# have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read into
# this topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Optional: Don't log access to assets
access_log off;
}
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
try_files $uri /index.php$request_uri;
# Optional: Don't log access to other assets
access_log off;
}
}
}

View File

@ -2,34 +2,52 @@ version: '3'
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
image: mariadb:10.6
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
- db:/var/lib/mysql:Z
environment:
- MYSQL_ROOT_PASSWORD=
- MARIADB_AUTO_UPGRADE=1
- MARIADB_DISABLE_UPGRADE_BACKUP=1
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html
- nextcloud:/var/www/html:z
environment:
- VIRTUAL_HOST=
- LETSENCRYPT_HOST=
- LETSENCRYPT_EMAIL=
- MYSQL_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
networks:
- proxy-tier
- default
cron:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
depends_on:
- db
- redis
proxy:
build: ./proxy
restart: always
@ -39,30 +57,47 @@ services:
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
- certs:/etc/nginx/certs:z,ro
- vhost.d:/etc/nginx/vhost.d:z
- html:/usr/share/nginx/html:z
- /var/run/docker.sock:/tmp/docker.sock:z,ro
networks:
- proxy-tier
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
image: nginxproxy/acme-companion
restart: always
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/etc/nginx/certs:z
- acme:/etc/acme.sh:z
- vhost.d:/etc/nginx/vhost.d:z
- html:/usr/share/nginx/html:z
- /var/run/docker.sock:/var/run/docker.sock:z,ro
networks:
- proxy-tier
depends_on:
- proxy
# self signed
# omgwtfssl:
# image: paulczar/omgwtfssl
# restart: "no"
# volumes:
# - certs:/certs
# environment:
# - SSL_SUBJECT=servhostname.local
# - CA_SUBJECT=my@example.com
# - SSL_KEY=/certs/servhostname.local.key
# - SSL_CSR=/certs/servhostname.local.csr
# - SSL_CERT=/certs/servhostname.local.crt
# networks:
# - proxy-tier
volumes:
db:
nextcloud:
certs:
acme:
vhost.d:
html:

View File

@ -1,3 +1,3 @@
FROM jwilder/nginx-proxy:alpine
FROM nginxproxy/nginx-proxy:alpine
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf

View File

@ -2,33 +2,41 @@ version: '3'
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
image: mariadb:10.6
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
- db:/var/lib/mysql:Z
environment:
- MYSQL_ROOT_PASSWORD=
- MARIADB_AUTO_UPGRADE=1
- MARIADB_DISABLE_UPGRADE_BACKUP=1
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
- nextcloud:/var/www/html:z
environment:
- MYSQL_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
web:
build: ./web
restart: always
volumes:
- nextcloud:/var/www/html:ro
- nextcloud:/var/www/html:z,ro
environment:
- VIRTUAL_HOST=
- LETSENCRYPT_HOST=
@ -39,6 +47,16 @@ services:
- proxy-tier
- default
cron:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
depends_on:
- db
- redis
proxy:
build: ./proxy
restart: always
@ -48,30 +66,47 @@ services:
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
- certs:/etc/nginx/certs:z,ro
- vhost.d:/etc/nginx/vhost.d:z
- html:/usr/share/nginx/html:z
- /var/run/docker.sock:/tmp/docker.sock:z,ro
networks:
- proxy-tier
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
image: nginxproxy/acme-companion
restart: always
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/etc/nginx/certs:z
- acme:/etc/acme.sh:z
- vhost.d:/etc/nginx/vhost.d:z
- html:/usr/share/nginx/html:z
- /var/run/docker.sock:/var/run/docker.sock:z,ro
networks:
- proxy-tier
depends_on:
- proxy
# self signed
# omgwtfssl:
# image: paulczar/omgwtfssl
# restart: "no"
# volumes:
# - certs:/certs
# environment:
# - SSL_SUBJECT=servhostname.local
# - CA_SUBJECT=my@example.com
# - SSL_KEY=/certs/servhostname.local.key
# - SSL_CSR=/certs/servhostname.local.csr
# - SSL_CERT=/certs/servhostname.local.crt
# networks:
# - proxy-tier
volumes:
db:
nextcloud:
certs:
acme:
vhost.d:
html:

View File

@ -1,3 +1,3 @@
FROM jwilder/nginx-proxy:alpine
FROM nginxproxy/nginx-proxy:alpine
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf

View File

@ -10,7 +10,7 @@ events {
http {
include /etc/nginx/mime.types;
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
@ -22,12 +22,16 @@ http {
sendfile on;
#tcp_nopush on;
# Prevent nginx HTTP Server Detection
server_tokens off;
keepalive_timeout 65;
set_real_ip_from 10.0.0.0/8;
set_real_ip_from 172.16.0.0/12;
set_real_ip_from 192.168.0.0/16;
real_ip_header X-Real-IP;
# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
"" "";
default "immutable";
}
#gzip on;
@ -38,136 +42,163 @@ http {
server {
listen 80;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/html;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# The following 2 rules are only needed for the user_webfinger app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
# The following rule is only needed for the Social app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
location = /.well-known/carddav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
# set max upload size
client_max_body_size 10G;
# set max upload size and increase upload timeout:
client_max_body_size 512M;
client_body_timeout 300s;
fastcgi_buffers 64 4K;
# The settings allows you to optimize the HTTP2 bandwidth.
# See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/
# for tuning hints
client_body_buffer_size 512k;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
# Pagespeed is not supported by Nextcloud, so if your server is built
# with the `ngx_pagespeed` module, uncomment this line to disable it.
#pagespeed off;
location / {
rewrite ^ /index.php;
# HTTP response headers borrowed from Nextcloud `.htaccess`
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "noindex, nofollow" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/html;
# Specify how to handle directories -- specifying `/index.php$request_uri`
# here as the fallback means that Nginx always exhibits the desired behaviour
# when a client requests a path that corresponds to a directory that exists
# on the server. In particular, if that directory contains an index.php file,
# that file is correctly served; if it doesn't, then the request is passed to
# the front-end controller. This consistent behaviour means that we don't need
# to specify custom rules for certain paths (e.g. images and other assets,
# `/updater`, `/ocm-provider`, `/ocs-provider`), and thus
# `try_files $uri $uri/ /index.php$request_uri`
# always provides the desired behaviour.
index index.php index.html /index.php$request_uri;
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
location = / {
if ( $http_user_agent ~ ^DavClnt ) {
return 302 /remote.php/webdav/$is_args$args;
}
}
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
deny all;
}
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
# Make a regex exception for `/.well-known` so that clients can still
# access it despite the existence of the regex rule
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
# for `/.well-known`.
location ^~ /.well-known {
# The rules in this block are an adaptation of the rules
# in `.htaccess` that concern `/.well-known`.
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
# Let Nextcloud's API for `/.well-known` URIs handle all other
# requests by passing them to the front-end controller.
return 301 /index.php$request_uri;
}
# Rules borrowed from `.htaccess` to hide certain paths from clients
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
# which handle static assets (as seen below). If this block is not declared first,
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
# to the URI, resulting in a HTTP 500 error response.
location ~ \.php(?:$|/) {
# Required for legacy support
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
# fastcgi_param HTTPS on;
fastcgi_param HTTPS on;
# Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
# Enable pretty urls
fastcgi_param front_controller_active true;
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_max_temp_file_size 0;
}
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
try_files $uri/ =404;
index index.php;
}
# Adding the cache control header for js, css and map files
# Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
# Javascript mimetype fixes for nginx
# Note: The block below should be removed, and the js|mjs section should be
# added to the block below this one. This is a temporary fix until Nginx
# upstream fixes the js mime-type
location ~* \.(?:js|mjs)$ {
types {
text/javascript js mjs;
}
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to
# have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read into
# this topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Optional: Don't log access to assets
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
access_log off;
}
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
# Serve static files
location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
try_files $uri /index.php$request_uri;
# Optional: Don't log access to other assets
access_log off;
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
access_log off; # Optional: Don't log access to assets
location ~ \.wasm$ {
default_type application/wasm;
}
}
location ~ \.woff2?$ {
try_files $uri /index.php$request_uri;
expires 7d; # Cache-Control policy borrowed from `.htaccess`
access_log off; # Optional: Don't log access to assets
}
# Rule borrowed from `.htaccess`
location /remote {
return 301 /remote.php$request_uri;
}
location / {
try_files $uri $uri/ /index.php$request_uri;
}
}
}

View File

@ -5,28 +5,44 @@ services:
image: postgres:alpine
restart: always
volumes:
- db:/var/lib/postgresql/data
- db:/var/lib/postgresql/data:Z
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html
- nextcloud:/var/www/html:z
environment:
- VIRTUAL_HOST=
- LETSENCRYPT_HOST=
- LETSENCRYPT_EMAIL=
- POSTGRES_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
networks:
- proxy-tier
- default
cron:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
depends_on:
- db
- redis
proxy:
build: ./proxy
restart: always
@ -36,30 +52,47 @@ services:
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
- certs:/etc/nginx/certs:z,ro
- vhost.d:/etc/nginx/vhost.d:z
- html:/usr/share/nginx/html:z
- /var/run/docker.sock:/tmp/docker.sock:z,ro
networks:
- proxy-tier
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
image: nginxproxy/acme-companion
restart: always
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/etc/nginx/certs:z
- acme:/etc/acme.sh:z
- vhost.d:/etc/nginx/vhost.d:z
- html:/usr/share/nginx/html:z
- /var/run/docker.sock:/var/run/docker.sock:z,ro
networks:
- proxy-tier
depends_on:
- proxy
# self signed
# omgwtfssl:
# image: paulczar/omgwtfssl
# restart: "no"
# volumes:
# - certs:/certs
# environment:
# - SSL_SUBJECT=servhostname.local
# - CA_SUBJECT=my@example.com
# - SSL_KEY=/certs/servhostname.local.key
# - SSL_CSR=/certs/servhostname.local.csr
# - SSL_CERT=/certs/servhostname.local.crt
# networks:
# - proxy-tier
volumes:
db:
nextcloud:
certs:
acme:
vhost.d:
html:

View File

@ -1,3 +1,3 @@
FROM jwilder/nginx-proxy:alpine
FROM nginxproxy/nginx-proxy:alpine
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf

View File

@ -5,27 +5,33 @@ services:
image: postgres:alpine
restart: always
volumes:
- db:/var/lib/postgresql/data
- db:/var/lib/postgresql/data:Z
env_file:
- db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
- nextcloud:/var/www/html:z
environment:
- POSTGRES_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
web:
build: ./web
restart: always
volumes:
- nextcloud:/var/www/html:ro
- nextcloud:/var/www/html:z,ro
environment:
- VIRTUAL_HOST=
- LETSENCRYPT_HOST=
@ -36,6 +42,16 @@ services:
- proxy-tier
- default
cron:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
depends_on:
- db
- redis
proxy:
build: ./proxy
restart: always
@ -45,30 +61,47 @@ services:
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
- certs:/etc/nginx/certs:z,ro
- vhost.d:/etc/nginx/vhost.d:z
- html:/usr/share/nginx/html:z
- /var/run/docker.sock:/tmp/docker.sock:z,ro
networks:
- proxy-tier
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
image: nginxproxy/acme-companion
restart: always
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/etc/nginx/certs:z
- acme:/etc/acme.sh:z
- vhost.d:/etc/nginx/vhost.d:z
- html:/usr/share/nginx/html:z
- /var/run/docker.sock:/var/run/docker.sock:z,ro
networks:
- proxy-tier
depends_on:
- proxy
# self signed
# omgwtfssl:
# image: paulczar/omgwtfssl
# restart: "no"
# volumes:
# - certs:/certs
# environment:
# - SSL_SUBJECT=servhostname.local
# - CA_SUBJECT=my@example.com
# - SSL_KEY=/certs/servhostname.local.key
# - SSL_CSR=/certs/servhostname.local.csr
# - SSL_CERT=/certs/servhostname.local.crt
# networks:
# - proxy-tier
volumes:
db:
nextcloud:
certs:
acme:
vhost.d:
html:

View File

@ -1,3 +1,3 @@
FROM jwilder/nginx-proxy:alpine
FROM nginxproxy/nginx-proxy:alpine
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf

View File

@ -10,7 +10,7 @@ events {
http {
include /etc/nginx/mime.types;
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
@ -22,12 +22,16 @@ http {
sendfile on;
#tcp_nopush on;
# Prevent nginx HTTP Server Detection
server_tokens off;
keepalive_timeout 65;
set_real_ip_from 10.0.0.0/8;
set_real_ip_from 172.16.0.0/12;
set_real_ip_from 192.168.0.0/16;
real_ip_header X-Real-IP;
# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
"" "";
default "immutable";
}
#gzip on;
@ -38,136 +42,163 @@ http {
server {
listen 80;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/html;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# The following 2 rules are only needed for the user_webfinger app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
# The following rule is only needed for the Social app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
location = /.well-known/carddav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host:$server_port/remote.php/dav;
}
# set max upload size
client_max_body_size 10G;
# set max upload size and increase upload timeout:
client_max_body_size 512M;
client_body_timeout 300s;
fastcgi_buffers 64 4K;
# The settings allows you to optimize the HTTP2 bandwidth.
# See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/
# for tuning hints
client_body_buffer_size 512k;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
# Pagespeed is not supported by Nextcloud, so if your server is built
# with the `ngx_pagespeed` module, uncomment this line to disable it.
#pagespeed off;
location / {
rewrite ^ /index.php;
# HTTP response headers borrowed from Nextcloud `.htaccess`
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "noindex, nofollow" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
root /var/www/html;
# Specify how to handle directories -- specifying `/index.php$request_uri`
# here as the fallback means that Nginx always exhibits the desired behaviour
# when a client requests a path that corresponds to a directory that exists
# on the server. In particular, if that directory contains an index.php file,
# that file is correctly served; if it doesn't, then the request is passed to
# the front-end controller. This consistent behaviour means that we don't need
# to specify custom rules for certain paths (e.g. images and other assets,
# `/updater`, `/ocm-provider`, `/ocs-provider`), and thus
# `try_files $uri $uri/ /index.php$request_uri`
# always provides the desired behaviour.
index index.php index.html /index.php$request_uri;
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
location = / {
if ( $http_user_agent ~ ^DavClnt ) {
return 302 /remote.php/webdav/$is_args$args;
}
}
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
deny all;
}
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
# Make a regex exception for `/.well-known` so that clients can still
# access it despite the existence of the regex rule
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
# for `/.well-known`.
location ^~ /.well-known {
# The rules in this block are an adaptation of the rules
# in `.htaccess` that concern `/.well-known`.
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
# Let Nextcloud's API for `/.well-known` URIs handle all other
# requests by passing them to the front-end controller.
return 301 /index.php$request_uri;
}
# Rules borrowed from `.htaccess` to hide certain paths from clients
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
# which handle static assets (as seen below). If this block is not declared first,
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
# to the URI, resulting in a HTTP 500 error response.
location ~ \.php(?:$|/) {
# Required for legacy support
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
# fastcgi_param HTTPS on;
fastcgi_param HTTPS on;
# Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
# Enable pretty urls
fastcgi_param front_controller_active true;
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_max_temp_file_size 0;
}
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
try_files $uri/ =404;
index index.php;
}
# Adding the cache control header for js, css and map files
# Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
# Javascript mimetype fixes for nginx
# Note: The block below should be removed, and the js|mjs section should be
# added to the block below this one. This is a temporary fix until Nginx
# upstream fixes the js mime-type
location ~* \.(?:js|mjs)$ {
types {
text/javascript js mjs;
}
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to
# have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read into
# this topic first.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Optional: Don't log access to assets
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
access_log off;
}
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
# Serve static files
location ~ \.(?:css|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
try_files $uri /index.php$request_uri;
# Optional: Don't log access to other assets
access_log off;
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
access_log off; # Optional: Don't log access to assets
location ~ \.wasm$ {
default_type application/wasm;
}
}
location ~ \.woff2?$ {
try_files $uri /index.php$request_uri;
expires 7d; # Cache-Control policy borrowed from `.htaccess`
access_log off; # Optional: Don't log access to assets
}
# Rule borrowed from `.htaccess`
location /remote {
return 301 /remote.php$request_uri;
}
location / {
try_files $uri $uri/ /index.php$request_uri;
}
}
}

View File

@ -5,6 +5,7 @@ RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
ffmpeg \
ghostscript \
libmagickcore-6.q16-6-extra \
procps \
smbclient \
@ -37,9 +38,9 @@ RUN set -ex; \
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
| sort -u \
| xargs -r dpkg-query -S \
| xargs -r dpkg-query --search \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \

View File

@ -17,7 +17,7 @@ RUN set -ex; \
$PHPIZE_DEPS \
imap-dev \
krb5-dev \
libressl-dev \
openssl-dev \
samba-dev \
bzip2-dev \
; \

View File

@ -5,6 +5,7 @@ RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
ffmpeg \
ghostscript \
libmagickcore-6.q16-6-extra \
procps \
smbclient \
@ -37,9 +38,9 @@ RUN set -ex; \
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
| sort -u \
| xargs -r dpkg-query -S \
| xargs -r dpkg-query --search \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \

View File

@ -17,9 +17,9 @@ RUN set -ex; \
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
| sort -u \
| xargs -r dpkg-query -S \
| xargs -r dpkg-query --search \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \

View File

@ -6,7 +6,7 @@ RUN set -ex; \
$PHPIZE_DEPS \
imap-dev \
krb5-dev \
libressl-dev \
openssl-dev \
; \
\
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \

View File

@ -17,9 +17,9 @@ RUN set -ex; \
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
| sort -u \
| xargs -r dpkg-query -S \
| xargs -r dpkg-query --search \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \

14
.github/ISSUE_TEMPLATE/Image_issue.md vendored Normal file
View File

@ -0,0 +1,14 @@
---
name: 🐛 Image issue
about: Issues related to the Nextcloud Docker image
---
<!--
Thanks for reporting issues back to Nextcloud!
When reporting problems, please include your *complete* Docker Compose file (or run commands) and your Nextcloud Server config (e.g. `occ config:list system`). Incomplete reports cause extra work for all parties involved and delay resolution.
Note: This is the issue tracker of the official Nextcloud **Docker image**, please do NOT use this to report issues with Docker or Nextcloud Server itself. You can find help debugging your system on our forums: https://help.nextcloud.com/ or https://forums.docker.com/.
To learn more about official images, see https://github.com/docker-library/faq
-->

10
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,10 @@
contact_links:
- name: 🐛 Nextcloud issue
url: https://github.com/nextcloud/server/issues/new/choose
about: Bug reports and feature requests for Nextcloud
- name: 🐳 Docker Support and Help
url: https://forums.docker.com/
about: Configuration, installation, networking and other questions
- name: ❓ Nextcloud Support and Help
url: https://help.nextcloud.com/
about: Configuration, webserver/proxy or performance issues and other questions

51
.github/workflows/command-rebase.yml vendored Normal file
View File

@ -0,0 +1,51 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
name: Rebase command
on:
issue_comment:
types: created
permissions:
contents: read
jobs:
rebase:
runs-on: ubuntu-latest
permissions:
contents: none
# On pull requests and if the comment starts with `/rebase`
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
steps:
- name: Add reaction on start
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "+1"
- name: Checkout the latest code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
fetch-depth: 0
token: ${{ secrets.COMMAND_BOT_PAT }}
- name: Automatic Rebase
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
env:
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
- name: Add reaction on failure
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1
if: failure()
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "-1"

65
.github/workflows/images.yml vendored Normal file
View File

@ -0,0 +1,65 @@
name: Images
on:
pull_request:
workflow_run:
workflows: ["update.sh"]
branches: [master]
types:
- completed
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
jobs:
init:
name: Generate Jobs
runs-on: ubuntu-latest
outputs:
strategy: ${{ steps.generate-jobs.outputs.strategy }}
steps:
- uses: actions/checkout@v4
- uses: docker-library/bashbrew@HEAD
- id: generate-jobs
name: Generate Jobs
run: |
strategy="$(GITHUB_REPOSITORY=nextcloud "$BASHBREW_SCRIPTS/github-actions/generate.sh")"
strategy="$("$BASHBREW_SCRIPTS/github-actions/munge-i386.sh" -c <<<"$strategy")"
echo "strategy=$strategy" >> "$GITHUB_OUTPUT"
jq . <<<"$strategy" # sanity check / debugging aid
test:
needs: init
strategy: ${{ fromJson(needs.init.outputs.strategy) }}
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Prepare Environment
run: ${{ matrix.runs.prepare }}
- name: Run update.sh script
run: ./update.sh
- name: Pull Dependencies
run: ${{ matrix.runs.pull }}
- name: Build ${{ matrix.name }}
run: ${{ matrix.runs.build }}
- name: History ${{ matrix.name }}
run: ${{ matrix.runs.history }}
- name: Test ${{ matrix.name }}
run: ${{ matrix.runs.test }}
- name: '"docker images"'
run: ${{ matrix.runs.images }}
summary:
runs-on: ubuntu-latest
needs: test
if: always()
name: images-test-summary
steps:
- name: Summary status
run: if ${{ needs.test.result != 'success' && needs.test.result != 'skipped' }}; then exit 1; fi

29
.github/workflows/update-sh.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: update.sh
on:
push:
branches:
- master
schedule:
- cron: '15 0 * * *'
workflow_dispatch:
jobs:
run_update_sh:
name: Run update.sh script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run update.sh script
run: ./update.sh
- name: Commit files
run: |
git config --local user.email "workflow@github.com"
git config --local user.name "GitHub Workflow"
git add -A
git commit -m "Runs update.sh" || echo "Nothing to update"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true

View File

@ -1,94 +0,0 @@
language: bash
services: docker
branches:
only:
- master
# preload images to avoid timeouts in tests
before_install:
- docker pull mariadb:10.3
- docker pull postgres:11-alpine
install:
- git clone https://github.com/docker-library/official-images.git ~/official-images
before_script:
- env | sort
- wget -qO- 'https://github.com/tianon/pgp-happy-eyeballs/raw/master/hack-my-builds.sh' | bash
- image="nextcloud:${VERSION}${VARIANT:+-$VARIANT}"
- if [[ "$ARCH" == 'i386' ]]; then sed -i -e 's/FROM php/FROM i386\/php/g' "${VERSION}/${VARIANT}/Dockerfile"; fi
script:
- |
(
set -Eeuo pipefail
set -x
travis_retry docker build -t "$image" "${VERSION}/${VARIANT}"
travis_retry ~/official-images/test/run.sh "$image"
.travis/test-example-dockerfiles.sh "$image"
)
after_script:
- docker images
jobs:
# https://github.com/docker-library/php/issues/822
allow_failures:
- env: VERSION=16.0 VARIANT=apache ARCH=i386
- env: VERSION=17.0 VARIANT=apache ARCH=i386
- env: VERSION=18.0 VARIANT=apache ARCH=i386
- env: VERSION=19.0 VARIANT=apache ARCH=i386
- env: VERSION=16.0-rc VARIANT=apache ARCH=i386
- env: VERSION=17.0-rc VARIANT=apache ARCH=i386
- env: VERSION=18.0-rc VARIANT=apache ARCH=i386
- env: VERSION=19.0-rc VARIANT=apache ARCH=i386
- env: VERSION=17.0-beta VARIANT=apache ARCH=i386
- env: VERSION=18.0-beta VARIANT=apache ARCH=i386
- env: VERSION=19.0-beta VARIANT=apache ARCH=i386
include:
- &test-scripts
stage: test scripts
env: SCRIPT=update.sh
services: []
install: skip
before_script: skip
script:
- hash_before=$(git write-tree)
- travis_retry ./update.sh
- bash -c "[[ $hash_before = $(git add -A && git write-tree) ]]"
after_script: skip
- <<: *test-scripts
env: SCRIPT=generate-stackbrew-library.sh
install:
- wget -O "$HOME/bin/bashbrew" https://doi-janky.infosiftr.net/job/bashbrew/lastSuccessfulBuild/artifact/bin/bashbrew-amd64
- chmod +x "$HOME/bin/bashbrew"
script:
- travis_retry ./generate-stackbrew-library.sh
- stage: test images
env: VERSION=19.0-beta VARIANT=fpm-alpine ARCH=amd64
- env: VERSION=19.0-beta VARIANT=fpm-alpine ARCH=i386
- env: VERSION=19.0-beta VARIANT=fpm ARCH=amd64
- env: VERSION=19.0-beta VARIANT=fpm ARCH=i386
- env: VERSION=19.0-beta VARIANT=apache ARCH=amd64
- env: VERSION=19.0-beta VARIANT=apache ARCH=i386
- env: VERSION=16.0 VARIANT=fpm-alpine ARCH=amd64
- env: VERSION=16.0 VARIANT=fpm-alpine ARCH=i386
- env: VERSION=16.0 VARIANT=fpm ARCH=amd64
- env: VERSION=16.0 VARIANT=fpm ARCH=i386
- env: VERSION=16.0 VARIANT=apache ARCH=amd64
- env: VERSION=16.0 VARIANT=apache ARCH=i386
- env: VERSION=17.0 VARIANT=fpm-alpine ARCH=amd64
- env: VERSION=17.0 VARIANT=fpm-alpine ARCH=i386
- env: VERSION=17.0 VARIANT=fpm ARCH=amd64
- env: VERSION=17.0 VARIANT=fpm ARCH=i386
- env: VERSION=17.0 VARIANT=apache ARCH=amd64
- env: VERSION=17.0 VARIANT=apache ARCH=i386
- env: VERSION=18.0 VARIANT=fpm-alpine ARCH=amd64
- env: VERSION=18.0 VARIANT=fpm-alpine ARCH=i386
- env: VERSION=18.0 VARIANT=fpm ARCH=amd64
- env: VERSION=18.0 VARIANT=fpm ARCH=i386
- env: VERSION=18.0 VARIANT=apache ARCH=amd64
- env: VERSION=18.0 VARIANT=apache ARCH=i386

View File

@ -1,18 +0,0 @@
#!/bin/bash
set -e
image="$1"
cd .examples/dockerfiles
dirs=( */ )
dirs=( "${dirs[@]%/}" )
for dir in "${dirs[@]}"; do
if [ -d "$dir/$VARIANT" ]; then
(
cd "$dir/$VARIANT"
sed -ri -e 's/^FROM .*/FROM '"$image"'/g' 'Dockerfile'
docker build -t "$image-$dir" .
)
fi
done

View File

@ -1,151 +0,0 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.3-apache-buster
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
rsync \
bzip2 \
busybox-static \
; \
rm -rf /var/lib/apt/lists/*; \
\
mkdir -p /var/spool/cron/crontabs; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libevent-dev \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libpng-dev \
libpq-dev \
libxml2-dev \
libmagickwand-dev \
libzip-dev \
libwebp-dev \
libgmp-dev \
; \
\
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
if [ ! -e /usr/include/gmp.h ]; then ln -s /usr/include/$debMultiarch/gmp.h /usr/include/gmp.h; fi;\
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \
docker-php-ext-configure gmp --with-gmp="/usr/include/$debMultiarch"; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \
exif \
gd \
intl \
ldap \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
zip \
gmp \
; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.18; \
pecl install memcached-3.1.5; \
pecl install redis-4.3.0; \
pecl install imagick-3.4.4; \
\
docker-php-ext-enable \
apcu \
memcached \
redis \
imagick \
; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# set recommended PHP.ini settings
# see https://docs.nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.save_comments=1'; \
echo 'opcache.revalidate_freq=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www
VOLUME /var/www/html
RUN a2enmod headers rewrite remoteip ;\
{\
echo RemoteIPHeader X-Real-IP ;\
echo RemoteIPTrustedProxy 10.0.0.0/8 ;\
echo RemoteIPTrustedProxy 172.16.0.0/12 ;\
echo RemoteIPTrustedProxy 192.168.0.0/16 ;\
} > /etc/apache2/conf-available/remoteip.conf;\
a2enconf remoteip
ENV NEXTCLOUD_VERSION 16.0.10
RUN set -ex; \
fetchDeps=" \
gnupg \
dirmngr \
"; \
apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \
\
curl -fsSL -o nextcloud.tar.bz2 \
"https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \
curl -fsSL -o nextcloud.tar.bz2.asc \
"https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
rm -rf /usr/src/nextcloud/updater; \
mkdir -p /usr/src/nextcloud/data; \
mkdir -p /usr/src/nextcloud/custom_apps; \
chmod +x /usr/src/nextcloud/occ; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
rm -rf /var/lib/apt/lists/*
COPY *.sh upgrade.exclude /
COPY config/* /usr/src/nextcloud/config/
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]

View File

@ -1,15 +0,0 @@
<?php
$CONFIG = array (
"apps_paths" => array (
0 => array (
"path" => OC::$SERVERROOT."/apps",
"url" => "/apps",
"writable" => false,
),
1 => array (
"path" => OC::$SERVERROOT."/custom_apps",
"url" => "/custom_apps",
"writable" => true,
),
),
);

View File

@ -1,31 +0,0 @@
<?php
$autoconfig_enabled = false;
if (getenv('SQLITE_DATABASE')) {
$AUTOCONFIG["dbtype"] = "sqlite";
$AUTOCONFIG["dbname"] = getenv('SQLITE_DATABASE');
$autoconfig_enabled = true;
} elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) {
$AUTOCONFIG["dbtype"] = "mysql";
$AUTOCONFIG["dbname"] = getenv('MYSQL_DATABASE');
$AUTOCONFIG["dbuser"] = getenv('MYSQL_USER');
$AUTOCONFIG["dbpass"] = getenv('MYSQL_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('MYSQL_HOST');
$autoconfig_enabled = true;
} elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) {
$AUTOCONFIG["dbtype"] = "pgsql";
$AUTOCONFIG["dbname"] = getenv('POSTGRES_DB');
$AUTOCONFIG["dbuser"] = getenv('POSTGRES_USER');
$AUTOCONFIG["dbpass"] = getenv('POSTGRES_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('POSTGRES_HOST');
$autoconfig_enabled = true;
}
if ($autoconfig_enabled) {
if (getenv('NEXTCLOUD_TABLE_PREFIX')) {
$AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX');
}
$AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data";
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
set -eu
exec busybox crond -f -l 0 -L /dev/stdout

View File

@ -1,192 +0,0 @@
#!/bin/sh
set -eu
# version_greater A B returns whether A > B
version_greater() {
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ]
}
# return true if specified directory is empty
directory_empty() {
[ -z "$(ls -A "$1/")" ]
}
run_as() {
if [ "$(id -u)" = 0 ]; then
su -p www-data -s /bin/sh -c "$1"
else
sh -c "$1"
fi
}
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
if [ -n "${varValue}" ]; then
export "$var"="${varValue}"
elif [ -n "${fileVarValue}" ]; then
export "$var"="$(cat "${fileVarValue}")"
elif [ -n "${def}" ]; then
export "$var"="$def"
fi
unset "$fileVar"
}
if expr "$1" : "apache" 1>/dev/null; then
if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then
a2disconf remoteip
fi
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
# check if redis host is an unix socket path
if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then
if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"unix://${REDIS_HOST}\""
fi
# check if redis password has been set
elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
fi
# shellcheck disable=SC2016
image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')"
if version_greater "$installed_version" "$image_version"; then
echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit 1
fi
if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then
echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root"
else
rsync_options="-rlD"
fi
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi
done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished"
#install
if [ "$installed_version" = "0.0.0.0" ]; then
echo "New nextcloud instance"
file_env NEXTCLOUD_ADMIN_PASSWORD
file_env NEXTCLOUD_ADMIN_USER
if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then
# shellcheck disable=SC2016
install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"'
if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"'
fi
file_env MYSQL_DATABASE
file_env MYSQL_PASSWORD
file_env MYSQL_USER
file_env POSTGRES_DB
file_env POSTGRES_PASSWORD
file_env POSTGRES_USER
install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database"
# shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"'
install=true
elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then
echo "Installing with MySQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"'
install=true
elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then
echo "Installing with PostgreSQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"'
install=true
fi
if [ "$install" = true ]; then
echo "starting nextcloud installation"
max_retries=10
try=0
until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ]
do
echo "retrying install..."
try=$((try+1))
sleep 10s
done
if [ "$try" -gt "$max_retries" ]; then
echo "installing of nextcloud failed!"
exit 1
fi
if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then
echo "setting trusted domains…"
NC_TRUSTED_DOMAIN_IDX=1
for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do
DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN"
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
else
echo "running web-based installer on first connect!"
fi
fi
#upgrade
else
run_as 'php /var/www/html/occ upgrade'
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after
echo "The following apps have been disabled:"
diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi
fi
exec "$@"

View File

@ -1,126 +0,0 @@
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
FROM php:7.3-fpm-alpine3.11
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
apk add --no-cache \
rsync \
; \
\
rm /var/spool/cron/crontabs/root; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \
\
apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
autoconf \
freetype-dev \
icu-dev \
libevent-dev \
libjpeg-turbo-dev \
libmcrypt-dev \
libpng-dev \
libmemcached-dev \
libxml2-dev \
libzip-dev \
openldap-dev \
pcre-dev \
postgresql-dev \
imagemagick-dev \
libwebp-dev \
gmp-dev \
; \
\
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \
docker-php-ext-configure ldap; \
docker-php-ext-install -j "$(nproc)" \
exif \
gd \
intl \
ldap \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
zip \
gmp \
; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.18; \
pecl install memcached-3.1.5; \
pecl install redis-4.3.0; \
pecl install imagick-3.4.4; \
\
docker-php-ext-enable \
apcu \
memcached \
redis \
imagick \
; \
\
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .nextcloud-phpext-rundeps $runDeps; \
apk del .build-deps
# set recommended PHP.ini settings
# see https://docs.nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.save_comments=1'; \
echo 'opcache.revalidate_freq=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www
VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 16.0.10
RUN set -ex; \
apk add --no-cache --virtual .fetch-deps \
bzip2 \
gnupg \
; \
\
curl -fsSL -o nextcloud.tar.bz2 \
"https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \
curl -fsSL -o nextcloud.tar.bz2.asc \
"https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
rm -rf /usr/src/nextcloud/updater; \
mkdir -p /usr/src/nextcloud/data; \
mkdir -p /usr/src/nextcloud/custom_apps; \
chmod +x /usr/src/nextcloud/occ; \
apk del .fetch-deps
COPY *.sh upgrade.exclude /
COPY config/* /usr/src/nextcloud/config/
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]

View File

@ -1,15 +0,0 @@
<?php
$CONFIG = array (
"apps_paths" => array (
0 => array (
"path" => OC::$SERVERROOT."/apps",
"url" => "/apps",
"writable" => false,
),
1 => array (
"path" => OC::$SERVERROOT."/custom_apps",
"url" => "/custom_apps",
"writable" => true,
),
),
);

View File

@ -1,31 +0,0 @@
<?php
$autoconfig_enabled = false;
if (getenv('SQLITE_DATABASE')) {
$AUTOCONFIG["dbtype"] = "sqlite";
$AUTOCONFIG["dbname"] = getenv('SQLITE_DATABASE');
$autoconfig_enabled = true;
} elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) {
$AUTOCONFIG["dbtype"] = "mysql";
$AUTOCONFIG["dbname"] = getenv('MYSQL_DATABASE');
$AUTOCONFIG["dbuser"] = getenv('MYSQL_USER');
$AUTOCONFIG["dbpass"] = getenv('MYSQL_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('MYSQL_HOST');
$autoconfig_enabled = true;
} elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) {
$AUTOCONFIG["dbtype"] = "pgsql";
$AUTOCONFIG["dbname"] = getenv('POSTGRES_DB');
$AUTOCONFIG["dbuser"] = getenv('POSTGRES_USER');
$AUTOCONFIG["dbpass"] = getenv('POSTGRES_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('POSTGRES_HOST');
$autoconfig_enabled = true;
}
if ($autoconfig_enabled) {
if (getenv('NEXTCLOUD_TABLE_PREFIX')) {
$AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX');
}
$AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data";
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
set -eu
exec busybox crond -f -l 0 -L /dev/stdout

View File

@ -1,192 +0,0 @@
#!/bin/sh
set -eu
# version_greater A B returns whether A > B
version_greater() {
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ]
}
# return true if specified directory is empty
directory_empty() {
[ -z "$(ls -A "$1/")" ]
}
run_as() {
if [ "$(id -u)" = 0 ]; then
su -p www-data -s /bin/sh -c "$1"
else
sh -c "$1"
fi
}
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
if [ -n "${varValue}" ]; then
export "$var"="${varValue}"
elif [ -n "${fileVarValue}" ]; then
export "$var"="$(cat "${fileVarValue}")"
elif [ -n "${def}" ]; then
export "$var"="$def"
fi
unset "$fileVar"
}
if expr "$1" : "apache" 1>/dev/null; then
if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then
a2disconf remoteip
fi
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
# check if redis host is an unix socket path
if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then
if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"unix://${REDIS_HOST}\""
fi
# check if redis password has been set
elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
fi
# shellcheck disable=SC2016
image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')"
if version_greater "$installed_version" "$image_version"; then
echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit 1
fi
if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then
echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root"
else
rsync_options="-rlD"
fi
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi
done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished"
#install
if [ "$installed_version" = "0.0.0.0" ]; then
echo "New nextcloud instance"
file_env NEXTCLOUD_ADMIN_PASSWORD
file_env NEXTCLOUD_ADMIN_USER
if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then
# shellcheck disable=SC2016
install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"'
if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"'
fi
file_env MYSQL_DATABASE
file_env MYSQL_PASSWORD
file_env MYSQL_USER
file_env POSTGRES_DB
file_env POSTGRES_PASSWORD
file_env POSTGRES_USER
install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database"
# shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"'
install=true
elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then
echo "Installing with MySQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"'
install=true
elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then
echo "Installing with PostgreSQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"'
install=true
fi
if [ "$install" = true ]; then
echo "starting nextcloud installation"
max_retries=10
try=0
until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ]
do
echo "retrying install..."
try=$((try+1))
sleep 10s
done
if [ "$try" -gt "$max_retries" ]; then
echo "installing of nextcloud failed!"
exit 1
fi
if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then
echo "setting trusted domains…"
NC_TRUSTED_DOMAIN_IDX=1
for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do
DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN"
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
else
echo "running web-based installer on first connect!"
fi
fi
#upgrade
else
run_as 'php /var/www/html/occ upgrade'
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after
echo "The following apps have been disabled:"
diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi
fi
exec "$@"

View File

@ -1,143 +0,0 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.3-fpm-buster
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
rsync \
bzip2 \
busybox-static \
; \
rm -rf /var/lib/apt/lists/*; \
\
mkdir -p /var/spool/cron/crontabs; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libevent-dev \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libpng-dev \
libpq-dev \
libxml2-dev \
libmagickwand-dev \
libzip-dev \
libwebp-dev \
libgmp-dev \
; \
\
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
if [ ! -e /usr/include/gmp.h ]; then ln -s /usr/include/$debMultiarch/gmp.h /usr/include/gmp.h; fi;\
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \
docker-php-ext-configure gmp --with-gmp="/usr/include/$debMultiarch"; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \
exif \
gd \
intl \
ldap \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
zip \
gmp \
; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.18; \
pecl install memcached-3.1.5; \
pecl install redis-4.3.0; \
pecl install imagick-3.4.4; \
\
docker-php-ext-enable \
apcu \
memcached \
redis \
imagick \
; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# set recommended PHP.ini settings
# see https://docs.nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.save_comments=1'; \
echo 'opcache.revalidate_freq=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
\
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www
VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 16.0.10
RUN set -ex; \
fetchDeps=" \
gnupg \
dirmngr \
"; \
apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \
\
curl -fsSL -o nextcloud.tar.bz2 \
"https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \
curl -fsSL -o nextcloud.tar.bz2.asc \
"https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
# gpg key from https://nextcloud.com/nextcloud.asc
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
rm -rf /usr/src/nextcloud/updater; \
mkdir -p /usr/src/nextcloud/data; \
mkdir -p /usr/src/nextcloud/custom_apps; \
chmod +x /usr/src/nextcloud/occ; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
rm -rf /var/lib/apt/lists/*
COPY *.sh upgrade.exclude /
COPY config/* /usr/src/nextcloud/config/
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]

View File

@ -1,15 +0,0 @@
<?php
$CONFIG = array (
"apps_paths" => array (
0 => array (
"path" => OC::$SERVERROOT."/apps",
"url" => "/apps",
"writable" => false,
),
1 => array (
"path" => OC::$SERVERROOT."/custom_apps",
"url" => "/custom_apps",
"writable" => true,
),
),
);

View File

@ -1,31 +0,0 @@
<?php
$autoconfig_enabled = false;
if (getenv('SQLITE_DATABASE')) {
$AUTOCONFIG["dbtype"] = "sqlite";
$AUTOCONFIG["dbname"] = getenv('SQLITE_DATABASE');
$autoconfig_enabled = true;
} elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) {
$AUTOCONFIG["dbtype"] = "mysql";
$AUTOCONFIG["dbname"] = getenv('MYSQL_DATABASE');
$AUTOCONFIG["dbuser"] = getenv('MYSQL_USER');
$AUTOCONFIG["dbpass"] = getenv('MYSQL_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('MYSQL_HOST');
$autoconfig_enabled = true;
} elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) {
$AUTOCONFIG["dbtype"] = "pgsql";
$AUTOCONFIG["dbname"] = getenv('POSTGRES_DB');
$AUTOCONFIG["dbuser"] = getenv('POSTGRES_USER');
$AUTOCONFIG["dbpass"] = getenv('POSTGRES_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('POSTGRES_HOST');
$autoconfig_enabled = true;
}
if ($autoconfig_enabled) {
if (getenv('NEXTCLOUD_TABLE_PREFIX')) {
$AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX');
}
$AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data";
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
set -eu
exec busybox crond -f -l 0 -L /dev/stdout

View File

@ -1,192 +0,0 @@
#!/bin/sh
set -eu
# version_greater A B returns whether A > B
version_greater() {
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ]
}
# return true if specified directory is empty
directory_empty() {
[ -z "$(ls -A "$1/")" ]
}
run_as() {
if [ "$(id -u)" = 0 ]; then
su -p www-data -s /bin/sh -c "$1"
else
sh -c "$1"
fi
}
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
if [ -n "${varValue}" ]; then
export "$var"="${varValue}"
elif [ -n "${fileVarValue}" ]; then
export "$var"="$(cat "${fileVarValue}")"
elif [ -n "${def}" ]; then
export "$var"="$def"
fi
unset "$fileVar"
}
if expr "$1" : "apache" 1>/dev/null; then
if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then
a2disconf remoteip
fi
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
# check if redis host is an unix socket path
if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then
if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"unix://${REDIS_HOST}\""
fi
# check if redis password has been set
elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
fi
# shellcheck disable=SC2016
image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')"
if version_greater "$installed_version" "$image_version"; then
echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit 1
fi
if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then
echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root"
else
rsync_options="-rlD"
fi
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi
done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished"
#install
if [ "$installed_version" = "0.0.0.0" ]; then
echo "New nextcloud instance"
file_env NEXTCLOUD_ADMIN_PASSWORD
file_env NEXTCLOUD_ADMIN_USER
if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then
# shellcheck disable=SC2016
install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"'
if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"'
fi
file_env MYSQL_DATABASE
file_env MYSQL_PASSWORD
file_env MYSQL_USER
file_env POSTGRES_DB
file_env POSTGRES_PASSWORD
file_env POSTGRES_USER
install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database"
# shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"'
install=true
elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then
echo "Installing with MySQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"'
install=true
elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then
echo "Installing with PostgreSQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"'
install=true
fi
if [ "$install" = true ]; then
echo "starting nextcloud installation"
max_retries=10
try=0
until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ]
do
echo "retrying install..."
try=$((try+1))
sleep 10s
done
if [ "$try" -gt "$max_retries" ]; then
echo "installing of nextcloud failed!"
exit 1
fi
if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then
echo "setting trusted domains…"
NC_TRUSTED_DOMAIN_IDX=1
for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do
DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN"
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
else
echo "running web-based installer on first connect!"
fi
fi
#upgrade
else
run_as 'php /var/www/html/occ upgrade'
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after
echo "The following apps have been disabled:"
diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi
fi
exec "$@"

View File

@ -1,15 +0,0 @@
<?php
$CONFIG = array (
"apps_paths" => array (
0 => array (
"path" => OC::$SERVERROOT."/apps",
"url" => "/apps",
"writable" => false,
),
1 => array (
"path" => OC::$SERVERROOT."/custom_apps",
"url" => "/custom_apps",
"writable" => true,
),
),
);

View File

@ -1,31 +0,0 @@
<?php
$autoconfig_enabled = false;
if (getenv('SQLITE_DATABASE')) {
$AUTOCONFIG["dbtype"] = "sqlite";
$AUTOCONFIG["dbname"] = getenv('SQLITE_DATABASE');
$autoconfig_enabled = true;
} elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) {
$AUTOCONFIG["dbtype"] = "mysql";
$AUTOCONFIG["dbname"] = getenv('MYSQL_DATABASE');
$AUTOCONFIG["dbuser"] = getenv('MYSQL_USER');
$AUTOCONFIG["dbpass"] = getenv('MYSQL_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('MYSQL_HOST');
$autoconfig_enabled = true;
} elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) {
$AUTOCONFIG["dbtype"] = "pgsql";
$AUTOCONFIG["dbname"] = getenv('POSTGRES_DB');
$AUTOCONFIG["dbuser"] = getenv('POSTGRES_USER');
$AUTOCONFIG["dbpass"] = getenv('POSTGRES_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('POSTGRES_HOST');
$autoconfig_enabled = true;
}
if ($autoconfig_enabled) {
if (getenv('NEXTCLOUD_TABLE_PREFIX')) {
$AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX');
}
$AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data";
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
set -eu
exec busybox crond -f -l 0 -L /dev/stdout

View File

@ -1,192 +0,0 @@
#!/bin/sh
set -eu
# version_greater A B returns whether A > B
version_greater() {
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ]
}
# return true if specified directory is empty
directory_empty() {
[ -z "$(ls -A "$1/")" ]
}
run_as() {
if [ "$(id -u)" = 0 ]; then
su -p www-data -s /bin/sh -c "$1"
else
sh -c "$1"
fi
}
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
if [ -n "${varValue}" ]; then
export "$var"="${varValue}"
elif [ -n "${fileVarValue}" ]; then
export "$var"="$(cat "${fileVarValue}")"
elif [ -n "${def}" ]; then
export "$var"="$def"
fi
unset "$fileVar"
}
if expr "$1" : "apache" 1>/dev/null; then
if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then
a2disconf remoteip
fi
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
# check if redis host is an unix socket path
if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then
if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"unix://${REDIS_HOST}\""
fi
# check if redis password has been set
elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
fi
# shellcheck disable=SC2016
image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')"
if version_greater "$installed_version" "$image_version"; then
echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit 1
fi
if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then
echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root"
else
rsync_options="-rlD"
fi
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi
done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished"
#install
if [ "$installed_version" = "0.0.0.0" ]; then
echo "New nextcloud instance"
file_env NEXTCLOUD_ADMIN_PASSWORD
file_env NEXTCLOUD_ADMIN_USER
if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then
# shellcheck disable=SC2016
install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"'
if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"'
fi
file_env MYSQL_DATABASE
file_env MYSQL_PASSWORD
file_env MYSQL_USER
file_env POSTGRES_DB
file_env POSTGRES_PASSWORD
file_env POSTGRES_USER
install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database"
# shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"'
install=true
elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then
echo "Installing with MySQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"'
install=true
elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then
echo "Installing with PostgreSQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"'
install=true
fi
if [ "$install" = true ]; then
echo "starting nextcloud installation"
max_retries=10
try=0
until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ]
do
echo "retrying install..."
try=$((try+1))
sleep 10s
done
if [ "$try" -gt "$max_retries" ]; then
echo "installing of nextcloud failed!"
exit 1
fi
if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then
echo "setting trusted domains…"
NC_TRUSTED_DOMAIN_IDX=1
for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do
DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN"
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
else
echo "running web-based installer on first connect!"
fi
fi
#upgrade
else
run_as 'php /var/www/html/occ upgrade'
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after
echo "The following apps have been disabled:"
diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi
fi
exec "$@"

View File

@ -1,15 +0,0 @@
<?php
$CONFIG = array (
"apps_paths" => array (
0 => array (
"path" => OC::$SERVERROOT."/apps",
"url" => "/apps",
"writable" => false,
),
1 => array (
"path" => OC::$SERVERROOT."/custom_apps",
"url" => "/custom_apps",
"writable" => true,
),
),
);

View File

@ -1,31 +0,0 @@
<?php
$autoconfig_enabled = false;
if (getenv('SQLITE_DATABASE')) {
$AUTOCONFIG["dbtype"] = "sqlite";
$AUTOCONFIG["dbname"] = getenv('SQLITE_DATABASE');
$autoconfig_enabled = true;
} elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) {
$AUTOCONFIG["dbtype"] = "mysql";
$AUTOCONFIG["dbname"] = getenv('MYSQL_DATABASE');
$AUTOCONFIG["dbuser"] = getenv('MYSQL_USER');
$AUTOCONFIG["dbpass"] = getenv('MYSQL_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('MYSQL_HOST');
$autoconfig_enabled = true;
} elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) {
$AUTOCONFIG["dbtype"] = "pgsql";
$AUTOCONFIG["dbname"] = getenv('POSTGRES_DB');
$AUTOCONFIG["dbuser"] = getenv('POSTGRES_USER');
$AUTOCONFIG["dbpass"] = getenv('POSTGRES_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('POSTGRES_HOST');
$autoconfig_enabled = true;
}
if ($autoconfig_enabled) {
if (getenv('NEXTCLOUD_TABLE_PREFIX')) {
$AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX');
}
$AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data";
}

View File

@ -1,17 +0,0 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
if (getenv('REDIS_HOST_PORT') !== false) {
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
} elseif (getenv('REDIS_HOST')[0] != '/') {
$CONFIG['redis']['port'] = 6379;
}
}

View File

@ -1,25 +0,0 @@
<?php
$overwriteHost = getenv('OVERWRITEHOST');
if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwriteHost;
}
$overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteProtocol;
}
$overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwriteWebRoot;
}
$overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwriteCondAddr;
}
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
}

View File

@ -1,15 +0,0 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
set -eu
exec busybox crond -f -l 0 -L /dev/stdout

View File

@ -1,192 +0,0 @@
#!/bin/sh
set -eu
# version_greater A B returns whether A > B
version_greater() {
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ]
}
# return true if specified directory is empty
directory_empty() {
[ -z "$(ls -A "$1/")" ]
}
run_as() {
if [ "$(id -u)" = 0 ]; then
su -p www-data -s /bin/sh -c "$1"
else
sh -c "$1"
fi
}
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
if [ -n "${varValue}" ]; then
export "$var"="${varValue}"
elif [ -n "${fileVarValue}" ]; then
export "$var"="$(cat "${fileVarValue}")"
elif [ -n "${def}" ]; then
export "$var"="$def"
fi
unset "$fileVar"
}
if expr "$1" : "apache" 1>/dev/null; then
if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then
a2disconf remoteip
fi
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
# check if redis host is an unix socket path
if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then
if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"unix://${REDIS_HOST}\""
fi
# check if redis password has been set
elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
fi
# shellcheck disable=SC2016
image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')"
if version_greater "$installed_version" "$image_version"; then
echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit 1
fi
if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then
echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root"
else
rsync_options="-rlD"
fi
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi
done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished"
#install
if [ "$installed_version" = "0.0.0.0" ]; then
echo "New nextcloud instance"
file_env NEXTCLOUD_ADMIN_PASSWORD
file_env NEXTCLOUD_ADMIN_USER
if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then
# shellcheck disable=SC2016
install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"'
if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"'
fi
file_env MYSQL_DATABASE
file_env MYSQL_PASSWORD
file_env MYSQL_USER
file_env POSTGRES_DB
file_env POSTGRES_PASSWORD
file_env POSTGRES_USER
install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database"
# shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"'
install=true
elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then
echo "Installing with MySQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"'
install=true
elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then
echo "Installing with PostgreSQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"'
install=true
fi
if [ "$install" = true ]; then
echo "starting nextcloud installation"
max_retries=10
try=0
until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ]
do
echo "retrying install..."
try=$((try+1))
sleep 10s
done
if [ "$try" -gt "$max_retries" ]; then
echo "installing of nextcloud failed!"
exit 1
fi
if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then
echo "setting trusted domains…"
NC_TRUSTED_DOMAIN_IDX=1
for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do
DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN"
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
else
echo "running web-based installer on first connect!"
fi
fi
#upgrade
else
run_as 'php /var/www/html/occ upgrade'
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after
echo "The following apps have been disabled:"
diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi
fi
exec "$@"

View File

@ -1,5 +0,0 @@
/config/
/data/
/custom_apps/
/themes/
/version.php

View File

@ -1,15 +0,0 @@
<?php
$CONFIG = array (
"apps_paths" => array (
0 => array (
"path" => OC::$SERVERROOT."/apps",
"url" => "/apps",
"writable" => false,
),
1 => array (
"path" => OC::$SERVERROOT."/custom_apps",
"url" => "/custom_apps",
"writable" => true,
),
),
);

View File

@ -1,31 +0,0 @@
<?php
$autoconfig_enabled = false;
if (getenv('SQLITE_DATABASE')) {
$AUTOCONFIG["dbtype"] = "sqlite";
$AUTOCONFIG["dbname"] = getenv('SQLITE_DATABASE');
$autoconfig_enabled = true;
} elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) {
$AUTOCONFIG["dbtype"] = "mysql";
$AUTOCONFIG["dbname"] = getenv('MYSQL_DATABASE');
$AUTOCONFIG["dbuser"] = getenv('MYSQL_USER');
$AUTOCONFIG["dbpass"] = getenv('MYSQL_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('MYSQL_HOST');
$autoconfig_enabled = true;
} elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) {
$AUTOCONFIG["dbtype"] = "pgsql";
$AUTOCONFIG["dbname"] = getenv('POSTGRES_DB');
$AUTOCONFIG["dbuser"] = getenv('POSTGRES_USER');
$AUTOCONFIG["dbpass"] = getenv('POSTGRES_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('POSTGRES_HOST');
$autoconfig_enabled = true;
}
if ($autoconfig_enabled) {
if (getenv('NEXTCLOUD_TABLE_PREFIX')) {
$AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX');
}
$AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data";
}

View File

@ -1,17 +0,0 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
if (getenv('REDIS_HOST_PORT') !== false) {
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
} elseif (getenv('REDIS_HOST')[0] != '/') {
$CONFIG['redis']['port'] = 6379;
}
}

View File

@ -1,25 +0,0 @@
<?php
$overwriteHost = getenv('OVERWRITEHOST');
if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwriteHost;
}
$overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteProtocol;
}
$overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwriteWebRoot;
}
$overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwriteCondAddr;
}
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
}

View File

@ -1,15 +0,0 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
set -eu
exec busybox crond -f -l 0 -L /dev/stdout

View File

@ -1,192 +0,0 @@
#!/bin/sh
set -eu
# version_greater A B returns whether A > B
version_greater() {
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ]
}
# return true if specified directory is empty
directory_empty() {
[ -z "$(ls -A "$1/")" ]
}
run_as() {
if [ "$(id -u)" = 0 ]; then
su -p www-data -s /bin/sh -c "$1"
else
sh -c "$1"
fi
}
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
if [ -n "${varValue}" ]; then
export "$var"="${varValue}"
elif [ -n "${fileVarValue}" ]; then
export "$var"="$(cat "${fileVarValue}")"
elif [ -n "${def}" ]; then
export "$var"="$def"
fi
unset "$fileVar"
}
if expr "$1" : "apache" 1>/dev/null; then
if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then
a2disconf remoteip
fi
fi
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
# check if redis host is an unix socket path
if [ "$(echo "$REDIS_HOST" | cut -c1-1)" = "/" ]; then
if [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"unix://${REDIS_HOST}\""
fi
# check if redis password has been set
elif [ -n "${REDIS_HOST_PASSWORD+x}" ]; then
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}\""
else
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
fi
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
fi
# shellcheck disable=SC2016
image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')"
if version_greater "$installed_version" "$image_version"; then
echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit 1
fi
if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then
echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root"
else
rsync_options="-rlD"
fi
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi
done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished"
#install
if [ "$installed_version" = "0.0.0.0" ]; then
echo "New nextcloud instance"
file_env NEXTCLOUD_ADMIN_PASSWORD
file_env NEXTCLOUD_ADMIN_USER
if [ -n "${NEXTCLOUD_ADMIN_USER+x}" ] && [ -n "${NEXTCLOUD_ADMIN_PASSWORD+x}" ]; then
# shellcheck disable=SC2016
install_options='-n --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD"'
if [ -n "${NEXTCLOUD_TABLE_PREFIX+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --database-table-prefix "$NEXTCLOUD_TABLE_PREFIX"'
fi
if [ -n "${NEXTCLOUD_DATA_DIR+x}" ]; then
# shellcheck disable=SC2016
install_options=$install_options' --data-dir "$NEXTCLOUD_DATA_DIR"'
fi
file_env MYSQL_DATABASE
file_env MYSQL_PASSWORD
file_env MYSQL_USER
file_env POSTGRES_DB
file_env POSTGRES_PASSWORD
file_env POSTGRES_USER
install=false
if [ -n "${SQLITE_DATABASE+x}" ]; then
echo "Installing with SQLite database"
# shellcheck disable=SC2016
install_options=$install_options' --database-name "$SQLITE_DATABASE"'
install=true
elif [ -n "${MYSQL_DATABASE+x}" ] && [ -n "${MYSQL_USER+x}" ] && [ -n "${MYSQL_PASSWORD+x}" ] && [ -n "${MYSQL_HOST+x}" ]; then
echo "Installing with MySQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database mysql --database-name "$MYSQL_DATABASE" --database-user "$MYSQL_USER" --database-pass "$MYSQL_PASSWORD" --database-host "$MYSQL_HOST"'
install=true
elif [ -n "${POSTGRES_DB+x}" ] && [ -n "${POSTGRES_USER+x}" ] && [ -n "${POSTGRES_PASSWORD+x}" ] && [ -n "${POSTGRES_HOST+x}" ]; then
echo "Installing with PostgreSQL database"
# shellcheck disable=SC2016
install_options=$install_options' --database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST"'
install=true
fi
if [ "$install" = true ]; then
echo "starting nextcloud installation"
max_retries=10
try=0
until run_as "php /var/www/html/occ maintenance:install $install_options" || [ "$try" -gt "$max_retries" ]
do
echo "retrying install..."
try=$((try+1))
sleep 10s
done
if [ "$try" -gt "$max_retries" ]; then
echo "installing of nextcloud failed!"
exit 1
fi
if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then
echo "setting trusted domains…"
NC_TRUSTED_DOMAIN_IDX=1
for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do
DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN"
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
else
echo "running web-based installer on first connect!"
fi
fi
#upgrade
else
run_as 'php /var/www/html/occ upgrade'
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after
echo "The following apps have been disabled:"
diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi
fi
exec "$@"

View File

@ -1,5 +0,0 @@
/config/
/data/
/custom_apps/
/themes/
/version.php

View File

@ -1,15 +0,0 @@
<?php
$CONFIG = array (
"apps_paths" => array (
0 => array (
"path" => OC::$SERVERROOT."/apps",
"url" => "/apps",
"writable" => false,
),
1 => array (
"path" => OC::$SERVERROOT."/custom_apps",
"url" => "/custom_apps",
"writable" => true,
),
),
);

View File

@ -1,31 +0,0 @@
<?php
$autoconfig_enabled = false;
if (getenv('SQLITE_DATABASE')) {
$AUTOCONFIG["dbtype"] = "sqlite";
$AUTOCONFIG["dbname"] = getenv('SQLITE_DATABASE');
$autoconfig_enabled = true;
} elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) {
$AUTOCONFIG["dbtype"] = "mysql";
$AUTOCONFIG["dbname"] = getenv('MYSQL_DATABASE');
$AUTOCONFIG["dbuser"] = getenv('MYSQL_USER');
$AUTOCONFIG["dbpass"] = getenv('MYSQL_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('MYSQL_HOST');
$autoconfig_enabled = true;
} elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) {
$AUTOCONFIG["dbtype"] = "pgsql";
$AUTOCONFIG["dbname"] = getenv('POSTGRES_DB');
$AUTOCONFIG["dbuser"] = getenv('POSTGRES_USER');
$AUTOCONFIG["dbpass"] = getenv('POSTGRES_PASSWORD');
$AUTOCONFIG["dbhost"] = getenv('POSTGRES_HOST');
$autoconfig_enabled = true;
}
if ($autoconfig_enabled) {
if (getenv('NEXTCLOUD_TABLE_PREFIX')) {
$AUTOCONFIG["dbtableprefix"] = getenv('NEXTCLOUD_TABLE_PREFIX');
}
$AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data";
}

View File

@ -1,17 +0,0 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'password' => getenv('REDIS_HOST_PASSWORD'),
),
);
if (getenv('REDIS_HOST_PORT') !== false) {
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
} elseif (getenv('REDIS_HOST')[0] != '/') {
$CONFIG['redis']['port'] = 6379;
}
}

View File

@ -1,25 +0,0 @@
<?php
$overwriteHost = getenv('OVERWRITEHOST');
if ($overwriteHost) {
$CONFIG['overwritehost'] = $overwriteHost;
}
$overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteProtocol) {
$CONFIG['overwriteprotocol'] = $overwriteProtocol;
}
$overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwriteWebRoot) {
$CONFIG['overwritewebroot'] = $overwriteWebRoot;
}
$overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwriteCondAddr) {
$CONFIG['overwritecondaddr'] = $overwriteCondAddr;
}
$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
$CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
}

View File

@ -1,15 +0,0 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

Some files were not shown because too many files have changed in this diff Show More