Compare commits

...

457 Commits

Author SHA1 Message Date
szaimen
6d0a68abf3 fix the build
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-09 16:31:28 +02:00
szaimen
9a0e3eccde fix the build
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-09 16:15:17 +02:00
szaimen
3449cd61f1 remove the backup archive from the repo as it produced issues
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-09 16:04:44 +02:00
szaimen
b6f22a04f9 1.2.0
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-09 15:54:06 +02:00
Simon L
346824b5e1 Merge pull request #584 from nextcloud/enh/576/rework-allowed-paths
refactor allowed paths
2022-05-09 15:51:06 +02:00
szaimen
36797305d8 document that windows is currently limited
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-09 15:48:18 +02:00
Simon L
32681c4c95 Merge pull request #536 from nextcloud/enh/535/fix-permission-changes
fix docker socket permission changes
2022-05-09 15:42:25 +02:00
Simon L
f508e7b33a Merge pull request #571 from nextcloud/enh/565/dns-resolution
check the DNS resolving on startup
2022-05-09 15:42:09 +02:00
szaimen
d669a0086c refactor allowed paths
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-09 15:41:01 +02:00
Simon L
5ef9846b61 Merge pull request #602 from nextcloud/dependabot/docker/Containers/mastercontainer/caddy-2.5.1-alpine
Bump caddy from 2.5.0-alpine to 2.5.1-alpine in /Containers/mastercontainer
2022-05-09 15:05:07 +02:00
Simon L
4025ac15ae Merge pull request #601 from nextcloud/dependabot/docker/Containers/apache/caddy-2.5.1-alpine
Bump caddy from 2.5.0-alpine to 2.5.1-alpine in /Containers/apache
2022-05-09 15:04:41 +02:00
dependabot[bot]
3baaf02969 Bump caddy in /Containers/mastercontainer
Bumps caddy from 2.5.0-alpine to 2.5.1-alpine.

---
updated-dependencies:
- dependency-name: caddy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 12:30:18 +00:00
dependabot[bot]
ddf45ad73f Bump caddy from 2.5.0-alpine to 2.5.1-alpine in /Containers/apache
Bumps caddy from 2.5.0-alpine to 2.5.1-alpine.

---
updated-dependencies:
- dependency-name: caddy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 12:30:12 +00:00
szaimen
c5066f2b31 make error message more clear
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-08 17:42:10 +02:00
szaimen
3b85396afe fix detail
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-07 13:31:14 +02:00
Simon L
b9dc1b26d2 Merge pull request #593 from nextcloud/enh/568/improve-reverse-proxy
improve the reverse-proxy documentation another time
2022-05-07 13:25:02 +02:00
szaimen
375ddad429 improve the reverse-proxy documentation another time
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-07 13:22:59 +02:00
Simon L
f699c57f07 Merge pull request #595 from nextcloud/fix/594/apache-not-starting
fix apache not starting
2022-05-07 12:36:36 +02:00
Simon L
199102918e Merge pull request #592 from nextcloud/enh/543/treafik
improve the traefik reverse proxy documentation
2022-05-07 12:24:49 +02:00
szaimen
31d369117a fix apache not starting
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-07 11:25:35 +02:00
szaimen
575150fb92 fix word
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-06 21:07:30 +02:00
szaimen
b3b8c85ace add another debug point
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-06 21:05:53 +02:00
szaimen
0bf4538fb9 don't allow access from nextcloud-aio-nextcloud
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-06 20:24:12 +02:00
szaimen
0b0d872c05 document possibilities for nginx-proxy
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-06 17:12:19 +02:00
szaimen
177477d3cb improve the traefik reverse proxy documentation
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-06 17:03:54 +02:00
Simon L
ed646c5cde Merge pull request #589 from nextcloud/enh/575/caddy
add an example caddy conf to the docker-compose file
2022-05-06 16:04:40 +02:00
Simon L
44584431e2 Merge pull request #590 from nextcloud/dependabot/docker/Containers/mastercontainer/docker-20.10.15-dind-alpine3.15
Bump docker from 20.10.14-dind-alpine3.15 to 20.10.15-dind-alpine3.15 in /Containers/mastercontainer
2022-05-06 14:32:38 +02:00
dependabot[bot]
8de4655db6 Bump docker in /Containers/mastercontainer
Bumps docker from 20.10.14-dind-alpine3.15 to 20.10.15-dind-alpine3.15.

---
updated-dependencies:
- dependency-name: docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 12:26:37 +00:00
Simon L
9f13f15eb2 Merge pull request #587 from marekschneider/patch-2
Fixed WebDav Uploads Nginx
2022-05-06 12:45:02 +02:00
szaimen
f732bed008 add an example caddy conf to the docker-compose file
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-06 12:40:37 +02:00
marekschneider
d02ff5fc9f Fixed WebDav Uploads Nginx
Signed-off-by: marekschneider <marek@kms.onl>
2022-05-06 12:26:19 +02:00
Simon L
b0d83d45a1 Merge pull request #573 from nextcloud/enh/565/synology-paths
allow volume directories for synology
2022-05-06 11:48:06 +02:00
Julius Härtl
be9a5f01ea Merge pull request #566 from nextcloud/enh/543/increase-timeout
increase forms error timeout
2022-05-06 09:28:32 +02:00
szaimen
895ec0387d increase error timeout
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-06 01:35:24 +02:00
szaimen
9f88384f12 document that nginx-proxy is not supported
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-06 01:02:06 +02:00
szaimen
f110d3e345 improve the reverse proxy ddocumentation again
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-06 00:34:37 +02:00
Simon L
c6ad842c62 Merge pull request #562 from nextcloud/enh/559/update-policy
document the update policy
2022-05-05 21:53:13 +02:00
Simon L
99ee0d6744 Merge pull request #574 from nextcloud/enh/570/reverse-proxy-documentation
improve the reverse proxy documentation
2022-05-05 21:45:09 +02:00
szaimen
aaf7bcca99 improve the reverse proxy documentation
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-05 21:43:25 +02:00
Simon L
84d164de41 Merge pull request #544 from nextcloud/enh/noid/system-requirements
improve optional addons section and add system requirements
2022-05-05 20:14:25 +02:00
szaimen
4759f8fad4 allow volume directories for synology
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-05 20:13:17 +02:00
Simon L
ee790d999a Merge pull request #561 from nextcloud/enh/560/verbose-output
make the variables check more verbose
2022-05-05 19:32:27 +02:00
Simon L
8ec7bb4af9 Merge pull request #555 from nextcloud/dependabot/docker/Containers/collabora/collabora/code-21.11.4.2.1
Bump collabora/code from 21.11.4.1.1 to 21.11.4.2.1 in /Containers/collabora
2022-05-05 19:31:39 +02:00
szaimen
c5973d9875 check the DNS resolving on startup
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-05 18:36:02 +02:00
Simon L
92bca4f424 Merge pull request #563 from nextcloud/enh/494/document-options
document all options in the docker-compose file
2022-05-05 09:24:40 +02:00
Simon L
ae36756476 Merge pull request #564 from nextcloud/enh/543/traefik
add Treafik 2 to reverse proxy documentation
2022-05-05 09:22:04 +02:00
szaimen
2c4ba5f4a8 add Treafik 2 to reverse proxy documentation
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-04 18:13:08 +02:00
Simon L
0a1e2c48e6 Merge pull request #550 from bentongxyz/patch-1
change some wordings to read more smoothly
2022-05-04 15:05:03 +02:00
szaimen
61cdb6b950 document all options in the docker-compose file
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-04 10:08:17 +02:00
szaimen
d6de2ea76f fix a detail
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-04 10:02:13 +02:00
szaimen
433db49eaf document the update policy
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-04 09:42:37 +02:00
szaimen
9af6a5fe4d make the variables check more verbose
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-04 09:16:16 +02:00
szaimen
732c8e7dd9 document vps builds
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-04 09:10:58 +02:00
szaimen
7f82405c8b fix the nextcloud update workflow
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-03 14:59:57 +02:00
dependabot[bot]
abdb477e8c Bump collabora/code in /Containers/collabora
Bumps collabora/code from 21.11.4.1.1 to 21.11.4.2.1.

---
updated-dependencies:
- dependency-name: collabora/code
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-03 12:25:37 +00:00
bentongxyz
dd19188d6f change some wordings to read more smoothly 2022-05-03 02:17:24 +08:00
Simon L
55a2f40eca Merge pull request #547 from nextcloud/dependabot/docker/Containers/talk/ubuntu-focal-20220426
Bump ubuntu from focal-20220415 to focal-20220426 in /Containers/talk
2022-05-02 19:46:03 +02:00
Simon L
de6a79ab5c Merge pull request #549 from nextcloud/dependabot/github_actions/github/codeql-action-2
Bump github/codeql-action from 1 to 2
2022-05-02 19:45:25 +02:00
dependabot[bot]
d53c2b21cb Bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 17:42:11 +00:00
szaimen
3d1cf55f50 copy nextcloud-aio app to the next major update
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-02 17:01:04 +02:00
dependabot[bot]
318310efef Bump ubuntu from focal-20220415 to focal-20220426 in /Containers/talk
Bumps ubuntu from focal-20220415 to focal-20220426.

---
updated-dependencies:
- dependency-name: ubuntu
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 12:40:32 +00:00
szaimen
531f0d7f52 improve optional addons section
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-05-02 11:31:53 +02:00
Julius Härtl
3ccc58fefd Merge pull request #545 from nextcloud/automated/noid/psalm-baseline-update-1651467315
[Automated] Update psalm-baseline.xml
2022-05-02 08:53:12 +02:00
nextcloud-command
edb987bdb7 Update psalm baseline
Signed-off-by: GitHub <noreply@github.com>
2022-05-02 04:55:15 +00:00
szaimen
0659414118 fix detail
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-30 12:21:09 +02:00
szaimen
82621cccdc improve the steps for the rsync backup
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-30 12:19:33 +02:00
szaimen
603ce7cca0 don't allow access from nextcloud-aio-nextcloud
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-28 21:57:19 +02:00
szaimen
8ba392ba0a fix docker socket permission changes
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-27 13:52:03 +02:00
szaimen
f518ea7fee simply turn autocomplete off
password is bad in terms of UX because you cannot see the password anymore
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-27 01:02:34 +02:00
szaimen
04b51a9467 password field should be a password
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-26 23:34:52 +02:00
szaimen
046aad7b1a increase to 1.1.0
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-26 22:00:02 +02:00
Simon L
0bd106e44a Merge pull request #527 from nextcloud/enh/525/instance-restore-process
make the instance restore process better understandable
2022-04-26 21:59:09 +02:00
Simon L
e7c24196ad Merge pull request #534 from nextcloud/enh/528/php-version
Block Nextcloud from starting if php version is not compatible with i…
2022-04-26 21:58:25 +02:00
Simon L
09f9a24fa2 Merge pull request #533 from nextcloud/enh/529/data-fingerprint
update data fingerprint when restore was done
2022-04-26 21:57:46 +02:00
Simon L
d979383993 Merge pull request #532 from nextcloud/enh/noid/improve-wording-daily-backup
improve wording regarding daily backup
2022-04-26 21:57:28 +02:00
Simon L
ca47e2d912 Merge pull request #523 from nextcloud/enh/522/improve-docker-api-version-message
improve message when docker api version is not supported
2022-04-26 21:56:58 +02:00
Simon L
2b89156bb1 Merge pull request #520 from nextcloud/enh/noid/show-initial-credentials-better
show the initial credentials more prominent when being new
2022-04-26 21:56:44 +02:00
szaimen
316ea5a618 Block Nextcloud from starting if php version is not compatible with installed NC version
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-26 19:17:38 +02:00
szaimen
8e00812e0d update data fingerprint when restore was done
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-26 15:44:13 +02:00
szaimen
e44fbc880b improve wording regarding daily backup
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-26 15:22:00 +02:00
Simon L
77fa851391 Merge pull request #531 from nextcloud/dependabot/docker/Containers/mastercontainer/caddy-2.5.0-alpine
Bump caddy from 2.4.6-alpine to 2.5.0-alpine in /Containers/mastercontainer
2022-04-26 14:44:49 +02:00
Simon L
75446409fb Merge pull request #530 from nextcloud/dependabot/docker/Containers/apache/caddy-2.5.0-alpine
Bump caddy from 2.4.6-alpine to 2.5.0-alpine in /Containers/apache
2022-04-26 14:44:32 +02:00
dependabot[bot]
249a0e4a55 Bump caddy in /Containers/mastercontainer
Bumps caddy from 2.4.6-alpine to 2.5.0-alpine.

---
updated-dependencies:
- dependency-name: caddy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-26 12:34:53 +00:00
dependabot[bot]
6a1ce7cd2e Bump caddy from 2.4.6-alpine to 2.5.0-alpine in /Containers/apache
Bumps caddy from 2.4.6-alpine to 2.5.0-alpine.

---
updated-dependencies:
- dependency-name: caddy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-26 12:34:51 +00:00
szaimen
d288bdd023 make the instance restore process better understandable
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-24 14:12:03 +02:00
szaimen
8da25b6c35 improve message when docker api version is not supported
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-23 22:16:46 +02:00
szaimen
388dadb587 show the initial credentials more prominent when being new
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-23 20:11:33 +02:00
Simon L
6037b4402b Merge pull request #519 from nextcloud/qa-test-plans-2
additional qa test plans
2022-04-23 20:01:39 +02:00
szaimen
933eddae6d additional qa test plans
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-23 19:58:20 +02:00
Simon L
e28a2c4559 Merge pull request #516 from nextcloud/enh/noid/qa-test-plans
add qa test plans
2022-04-23 19:00:54 +02:00
szaimen
1276a1a51f add qa test plans
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-23 18:58:25 +02:00
szaimen
73924df349 fix pecl dependency update regex
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-22 18:00:35 +02:00
szaimen
3ad2f2e2b1 1.0.2
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-22 17:02:22 +02:00
Simon L
bad7b8106b Merge pull request #512 from nextcloud/dependabot/docker/Containers/collabora/collabora/code-21.11.4.1.1
Bump collabora/code from 21.11.3.6.1 to 21.11.4.1.1 in /Containers/collabora
2022-04-22 16:59:07 +02:00
Simon L
82784a0297 Merge pull request #333 from nextcloud/nextcloud-container-update
Nextcloud update
2022-04-22 16:59:01 +02:00
Simon L
1f26c70865 Update Containers/nextcloud/Dockerfile
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-22 16:56:21 +02:00
Simon L
5129fcacdd Merge pull request #513 from nextcloud/dependabot/docker/Containers/talk/ubuntu-focal-20220415
Bump ubuntu from focal-20220404 to focal-20220415 in /Containers/talk
2022-04-22 15:19:46 +02:00
szaimen
1c0ab8a9e3 nextcloud-update automated change
Signed-off-by: GitHub <noreply@github.com>
2022-04-22 12:48:09 +00:00
dependabot[bot]
0b718acf82 Bump ubuntu from focal-20220404 to focal-20220415 in /Containers/talk
Bumps ubuntu from focal-20220404 to focal-20220415.

---
updated-dependencies:
- dependency-name: ubuntu
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 12:46:05 +00:00
dependabot[bot]
079a944c07 Bump collabora/code in /Containers/collabora
Bumps collabora/code from 21.11.3.6.1 to 21.11.4.1.1.

---
updated-dependencies:
- dependency-name: collabora/code
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-21 12:34:40 +00:00
Julius Härtl
657e384367 Merge pull request #511 from nextcloud/automated/noid/psalm-baseline-update-1650516559
[Automated] Update psalm-baseline.xml
2022-04-21 08:25:51 +02:00
nextcloud-command
32862a4d8a Update psalm baseline
Signed-off-by: GitHub <noreply@github.com>
2022-04-21 04:49:19 +00:00
szaimen
324d75bbee fix a few details
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-20 17:49:13 +02:00
szaimen
5d787e9167 increase to 1.0.1
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-20 17:27:15 +02:00
Simon L
a2047dc04b Merge pull request #497 from nextcloud/fix/489/channel-switch
refactor detection of available container updates
2022-04-20 17:26:26 +02:00
Simon L
5dfc30afa5 Merge pull request #510 from nextcloud/enh/495/send-notification
send notification for Nextcloud and app updates
2022-04-20 17:25:40 +02:00
Simon L
301f30dd2c Merge pull request #509 from nextcloud/enh/503/caddy-user
run caddy as different user
2022-04-20 17:24:11 +02:00
Simon L
dd751a9fe4 Merge pull request #507 from nextcloud/dependabot/docker/Containers/mastercontainer/php-8.0.18-apache-bullseye
Bump php from 8.0.17-apache-bullseye to 8.0.18-apache-bullseye in /Containers/mastercontainer
2022-04-20 17:21:44 +02:00
Simon L
265c0d563b Merge pull request #506 from nextcloud/dependabot/docker/Containers/nextcloud/php-8.0.18-fpm-alpine3.15
Bump php from 8.0.17-fpm-alpine3.15 to 8.0.18-fpm-alpine3.15 in /Containers/nextcloud
2022-04-20 17:21:22 +02:00
Simon L
43aba16204 Merge pull request #505 from nextcloud/dependabot/docker/Containers/apache/debian-bullseye-20220418-slim
Bump debian from bullseye-20220328-slim to bullseye-20220418-slim in /Containers/apache
2022-04-20 17:21:06 +02:00
Simon L
324a1156a0 Merge pull request #504 from nextcloud/dependabot/docker/Containers/borgbackup/debian-bullseye-20220418-slim
Bump debian from bullseye-20220328-slim to bullseye-20220418-slim in /Containers/borgbackup
2022-04-20 17:20:50 +02:00
szaimen
d994512140 add info regarding reverse proxy in docker container
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-20 17:19:28 +02:00
szaimen
130ca73dd2 send notification for Nextcloud and app updates
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-20 17:16:43 +02:00
szaimen
456f26b9d5 run caddy as different user
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-20 17:02:57 +02:00
dependabot[bot]
37997cc091 Bump php in /Containers/mastercontainer
Bumps php from 8.0.17-apache-bullseye to 8.0.18-apache-bullseye.

---
updated-dependencies:
- dependency-name: php
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 12:53:41 +00:00
dependabot[bot]
f3a7dfafa2 Bump php in /Containers/nextcloud
Bumps php from 8.0.17-fpm-alpine3.15 to 8.0.18-fpm-alpine3.15.

---
updated-dependencies:
- dependency-name: php
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 12:53:36 +00:00
dependabot[bot]
6be5bb6370 Bump debian in /Containers/apache
Bumps debian from bullseye-20220328-slim to bullseye-20220418-slim.

---
updated-dependencies:
- dependency-name: debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 12:52:45 +00:00
dependabot[bot]
a6ffb5495e Bump debian in /Containers/borgbackup
Bumps debian from bullseye-20220328-slim to bullseye-20220418-slim.

---
updated-dependencies:
- dependency-name: debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 12:52:41 +00:00
szaimen
3e59616b5d remove the found a bug notice
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-18 12:06:02 +02:00
szaimen
9930a368f0 fix switching between channels
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-17 13:57:22 +02:00
szaimen
ed319492f1 wrap password change section
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-16 11:34:22 +02:00
szaimen
a0cef69483 rework setup screen
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-14 20:25:08 +02:00
szaimen
d37a0f509d change link
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-14 15:07:12 +02:00
szaimen
3c34963504 add a disclaimer to the nginx config
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-14 15:04:19 +02:00
szaimen
460469feb4 this is also needed
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-13 17:06:57 +02:00
szaimen
c642f03d43 seems like this is needed anyways
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-13 16:55:55 +02:00
szaimen
1c172b4dd7 mention OnlyOffice and ClamAV
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-13 16:21:58 +02:00
szaimen
3a79002322 improve channel info
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-13 15:56:12 +02:00
Simon L
8aeee368d4 Merge pull request #468 from nextcloud/dependabot/docker/Containers/collabora/collabora/code-21.11.3.6.1
Bump collabora/code from 21.11.3.4.1 to 21.11.3.6.1 in /Containers/collabora
2022-04-13 15:42:22 +02:00
Simon L
541aa9c6c0 Merge pull request #478 from nextcloud/enh/noid/update-handling
improve update handling when changing channels
2022-04-13 15:41:06 +02:00
szaimen
627e9d325f fix domain config
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-13 15:39:32 +02:00
Simon L
1c85e3e825 Merge pull request #479 from nextcloud/aio-dependency-update
Dependency updates
2022-04-13 15:31:27 +02:00
Simon L
c4a8fef8e9 Merge pull request #487 from nextcloud/enh/276/beta-channel
add a beta channel
2022-04-13 15:20:47 +02:00
szaimen
76cbefafb5 adjust documentation
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-13 15:14:30 +02:00
szaimen
68447c9211 fix reviewdog
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-13 14:50:10 +02:00
szaimen
810d0590eb add a beta channel
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-13 14:39:00 +02:00
szaimen
3c81a90920 dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-04-10 12:14:47 +00:00
szaimen
d2cadf6b9f improve update handling when changing channels
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-09 14:17:53 +02:00
szaimen
18b3c76a67 update config to redirecto to discussions for questions
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-09 13:30:28 +02:00
dependabot[bot]
7312dac0f8 Bump collabora/code in /Containers/collabora
Bumps collabora/code from 21.11.3.4.1 to 21.11.3.6.1.

---
updated-dependencies:
- dependency-name: collabora/code
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-07 12:26:50 +00:00
szaimen
dfafec2314 it is UTC not CT
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-06 22:15:26 +02:00
szaimen
947be33fcf some small improvements
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-06 21:58:01 +02:00
Simon L
340f7450ca Merge pull request #465 from nextcloud/fix/424/fix-collabora-finally
make collabora work
2022-04-06 21:17:42 +02:00
szaimen
09bbe2fd87 make collabora work
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-06 21:14:41 +02:00
Simon L
e8d66a06d1 Merge pull request #464 from nextcloud/fix/noid/small-fixes
a few small improvements
2022-04-06 21:03:18 +02:00
szaimen
c66b31901a a few small improvements
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-06 21:01:29 +02:00
Simon L
94f0a799fc Merge pull request #463 from nextcloud/enh/459/only-one-session
make sure that only one session is active at a time
2022-04-06 15:27:41 +02:00
szaimen
c00a1efdac make sure that only one session is active at a time
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-06 15:21:05 +02:00
Simon L
73227b4f9d Merge pull request #462 from nextcloud/dependabot/docker/Containers/talk/ubuntu-focal-20220404
Bump ubuntu from focal-20220316 to focal-20220404 in /Containers/talk
2022-04-06 15:07:18 +02:00
dependabot[bot]
1a65c49331 Bump ubuntu from focal-20220316 to focal-20220404 in /Containers/talk
Bumps ubuntu from focal-20220316 to focal-20220404.

---
updated-dependencies:
- dependency-name: ubuntu
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-06 12:37:15 +00:00
Simon L
9ce1434f34 Merge pull request #461 from nextcloud/aio-dependency-update
Dependency updates
2022-04-06 14:22:47 +02:00
szaimen
8a62b4a2ea dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-04-06 12:22:06 +00:00
szaimen
9febf2bade increase version
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-06 14:07:43 +02:00
Simon L
098e1347a1 Merge pull request #458 from nextcloud/dependabot/docker/Containers/domaincheck/alpine-3.15.4
Bump alpine from 3.15.3 to 3.15.4 in /Containers/domaincheck
2022-04-06 14:06:22 +02:00
Simon L
74579ba7ea Merge pull request #457 from nextcloud/dependabot/docker/Containers/watchtower/alpine-3.15.4
Bump alpine from 3.15.3 to 3.15.4 in /Containers/watchtower
2022-04-06 14:06:08 +02:00
Simon L
5dc4fbdb21 Merge pull request #456 from nextcloud/aio-dependency-update
Dependency updates
2022-04-06 13:56:11 +02:00
Simon L
931b92b8b9 Merge pull request #449 from nextcloud/dependabot/docker/Containers/clamav/clamav/clamav-0.104.2-3
Bump clamav/clamav from 0.104.2-2 to 0.104.2-3 in /Containers/clamav
2022-04-06 13:55:04 +02:00
Simon L
888d16d790 Merge pull request #455 from nextcloud/enh/47/auto-backup
add option to enable daily backups
2022-04-06 13:54:00 +02:00
Simon L
21086df922 Merge pull request #454 from nextcloud/fix/424/fix-collabora
fix collabora not working out of the box
2022-04-06 13:53:23 +02:00
szaimen
5185a9f4ae fix collabora not working out of the box
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-06 13:52:34 +02:00
Simon L
7eba523e86 Merge pull request #451 from nextcloud/enh/noid/improve-instance-restore
improve instance restore for when nextcloud_datadir is set/not set
2022-04-06 13:50:59 +02:00
szaimen
bcf36406a8 add option to enable daily backups
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-06 00:59:55 +02:00
dependabot[bot]
abf9684d0d Bump alpine from 3.15.3 to 3.15.4 in /Containers/domaincheck
Bumps alpine from 3.15.3 to 3.15.4.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 12:29:28 +00:00
dependabot[bot]
cbb5e8f359 Bump alpine from 3.15.3 to 3.15.4 in /Containers/watchtower
Bumps alpine from 3.15.3 to 3.15.4.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 12:29:27 +00:00
szaimen
64c3f61b48 dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-04-05 12:18:22 +00:00
szaimen
936b4ebb0f add link about borgbackup also to the readme
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-04 13:01:18 +02:00
szaimen
7db547732d some further enhancements
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-04 00:27:57 +02:00
szaimen
912fa0697d another small improvement
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-04 00:03:41 +02:00
szaimen
68fd14bc86 improve instance restore for when nextcloud_datadir is set/not set
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-03 20:46:28 +02:00
szaimen
0d4152a7f9 some further small enhancements
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-03 20:20:11 +02:00
dependabot[bot]
78fc3c1343 Bump clamav/clamav from 0.104.2-2 to 0.104.2-3 in /Containers/clamav
Bumps clamav/clamav from 0.104.2-2 to 0.104.2-3.

---
updated-dependencies:
- dependency-name: clamav/clamav
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 12:33:16 +00:00
szaimen
b4e18256a6 some small fixes
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-31 20:30:15 +02:00
szaimen
f9b13a7786 increase version
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-31 19:01:32 +02:00
szaimen
37b33c7f4b fix detail
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-31 19:00:59 +02:00
Simon L
1f819e403b Merge pull request #443 from nextcloud/enh/418/improve-backup-container-running-check
improve is_backup_container_running check
2022-03-31 17:46:29 +02:00
szaimen
e3826f85b9 improve is_backup_container_running check
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-31 16:21:19 +02:00
Simon L
3e5ab69512 Merge pull request #445 from nextcloud/enh/418/move-stuff-around
move some stuff a bit around
2022-03-31 16:09:53 +02:00
Simon L
7d6695de7e Merge pull request #444 from nextcloud/enh/418/mention-reverse-proxies-early
update the documentation to mention reverse proxies in the first place
2022-03-31 16:09:18 +02:00
Simon L
06dd83f07a Merge pull request #442 from nextcloud/enh/418/show-current-status-better
improve showing the current status
2022-03-31 16:06:05 +02:00
Simon L
cd055c0838 Merge pull request #441 from nextcloud/enh/418/add-before-unload
add before-unload animation
2022-03-31 16:04:40 +02:00
Simon L
1e3bb9ccfe Merge pull request #440 from nextcloud/fix/418/improve-restore-process
improve the restore process
2022-03-31 16:04:01 +02:00
Simon L
7144eb84ff Merge pull request #439 from nextcloud/fix/424/try-to-fix-collabora
try to fix collabora
2022-03-31 15:55:27 +02:00
Simon L
def87f38e8 Merge pull request #438 from nextcloud/enh/242/document-external-backup
document how to create backup on external drive
2022-03-31 15:54:19 +02:00
Simon L
0a63b49504 Merge pull request #436 from nextcloud/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-03-31 15:50:59 +02:00
Simon L
e672a5029b Merge pull request #437 from nextcloud/enh/315/add-nginx
improve reverse proxy conf - add nginx
2022-03-31 15:48:58 +02:00
Simon L
e22c6d6cef Merge pull request #435 from nextcloud/dependabot/github_actions/peter-evans/create-pull-request-4
Bump peter-evans/create-pull-request from 3 to 4
2022-03-31 15:48:08 +02:00
Simon L
2290c0aede Merge pull request #433 from nextcloud/dependabot/docker/Containers/domaincheck/alpine-3.15.3
Bump alpine from 3.15.1 to 3.15.3 in /Containers/domaincheck
2022-03-31 15:47:26 +02:00
dependabot[bot]
e448bc1f64 Bump alpine from 3.15.1 to 3.15.3 in /Containers/domaincheck
Bumps alpine from 3.15.1 to 3.15.3.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-31 13:47:13 +00:00
Simon L
fb898b0ab3 Merge pull request #432 from nextcloud/dependabot/docker/Containers/apache/debian-bullseye-20220328-slim
Bump debian from bullseye-20220316-slim to bullseye-20220328-slim in /Containers/apache
2022-03-31 15:46:35 +02:00
Simon L
9cb2801e0f Merge pull request #431 from nextcloud/dependabot/docker/Containers/borgbackup/debian-bullseye-20220328-slim
Bump debian from bullseye-20220316-slim to bullseye-20220328-slim in /Containers/borgbackup
2022-03-31 15:46:00 +02:00
Simon L
d7a528075a Merge pull request #422 from nextcloud/dependabot/docker/Containers/mastercontainer/docker-20.10.14-dind-alpine3.15
Bump docker from 20.10.13-dind-alpine3.15 to 20.10.14-dind-alpine3.15 in /Containers/mastercontainer
2022-03-31 15:45:17 +02:00
dependabot[bot]
9c80cc1bb3 Bump docker in /Containers/mastercontainer
Bumps docker from 20.10.13-dind-alpine3.15 to 20.10.14-dind-alpine3.15.

---
updated-dependencies:
- dependency-name: docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-31 13:44:32 +00:00
Simon L
8d93da24d6 Merge pull request #430 from nextcloud/dependabot/docker/Containers/watchtower/alpine-3.15.3
Bump alpine from 3.15.1 to 3.15.3 in /Containers/watchtower
2022-03-31 15:44:30 +02:00
Simon L
faaa59e29a Merge pull request #429 from nextcloud/dependabot/docker/Containers/collabora/collabora/code-21.11.3.4.1
Bump collabora/code from 21.11.2.4.1 to 21.11.3.4.1 in /Containers/collabora
2022-03-31 15:43:54 +02:00
Simon L
3b1014d34d Merge pull request #417 from nextcloud/aio-dependency-update
Dependency updates
2022-03-31 15:43:15 +02:00
szaimen
3e9b191f94 move some stuff a bit around
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-30 18:21:51 +02:00
szaimen
b95bb65af8 update the documentation to mention reverse proxies in the first place
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-30 18:14:28 +02:00
szaimen
b72a1c0e59 improve showing the current status
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-30 17:30:22 +02:00
szaimen
8c7e0bc63a add before-unload animation
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-30 17:06:01 +02:00
szaimen
f5e8e5630d improve the restore process
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-30 16:35:04 +02:00
szaimen
89ff6ea408 try to fix collabora
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-30 14:37:02 +02:00
szaimen
814f4942f5 dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-03-30 12:21:43 +00:00
szaimen
0941b6dee0 document how to create backup on external drive
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-30 14:16:53 +02:00
szaimen
ae36403762 improve reverse proxy conf - add nginx
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-30 14:05:09 +02:00
dependabot[bot]
30eaaaa5f9 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-30 11:34:46 +00:00
dependabot[bot]
92a96ca245 Bump peter-evans/create-pull-request from 3 to 4
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-30 11:34:41 +00:00
szaimen
59a49c62b4 add github actions workflow
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-30 13:34:08 +02:00
dependabot[bot]
0b9108f566 Bump debian in /Containers/apache
Bumps debian from bullseye-20220316-slim to bullseye-20220328-slim.

---
updated-dependencies:
- dependency-name: debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-29 12:38:02 +00:00
dependabot[bot]
7c04f844a1 Bump debian in /Containers/borgbackup
Bumps debian from bullseye-20220316-slim to bullseye-20220328-slim.

---
updated-dependencies:
- dependency-name: debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-29 12:38:02 +00:00
dependabot[bot]
c2056ec215 Bump alpine from 3.15.1 to 3.15.3 in /Containers/watchtower
Bumps alpine from 3.15.1 to 3.15.3.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-29 12:38:01 +00:00
dependabot[bot]
8032f5b966 Bump collabora/code in /Containers/collabora
Bumps collabora/code from 21.11.2.4.1 to 21.11.3.4.1.

---
updated-dependencies:
- dependency-name: collabora/code
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 12:35:44 +00:00
szaimen
c79d46b868 ad a test to rsync script
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-26 19:38:17 +01:00
szaimen
1e7161d524 add notification to rsync script
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-26 19:25:12 +01:00
szaimen
3eede90e86 fix the restore UX flow and some other small improvements
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-22 23:18:46 +01:00
Simon L
33c822fd1e Merge pull request #410 from nextcloud/enh/38/allow-to-restore-instance-from-backup
allow to restore the whole instance from backup
2022-03-22 20:51:27 +01:00
szaimen
32935d1c33 move nextcloud talk once up
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-22 20:49:49 +01:00
szaimen
72ca611d2f don't put password change in a details tag
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-22 20:47:16 +01:00
szaimen
6c6c56fa1b allow to restore the whole instance from backup
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-22 20:31:06 +01:00
Simon L
6aa0b7097a Merge pull request #415 from nextcloud/enh/noid/reorder-interface
reorder the aio interface a bit more
2022-03-22 20:26:32 +01:00
szaimen
89caf9d725 reorder the aio interface a bit more
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-22 20:24:50 +01:00
szaimen
90ba2f7e92 fix a few things
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-22 19:37:31 +01:00
Simon L
55f4a8ec7f Merge pull request #414 from nextcloud/enh/noid/update-nextcloud
update Nextcloud to 23.0.3
2022-03-22 19:33:45 +01:00
szaimen
5f130528ce increase version to v0.9.0
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-22 13:45:15 +01:00
szaimen
9cffb5a6ee update Nextcloud to 23.0.3
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-22 13:41:07 +01:00
Simon L
164f7026b0 Merge pull request #412 from nextcloud/dependabot/composer/php/guzzlehttp/guzzle-7.4.2
Bump guzzlehttp/guzzle from 7.4.1 to 7.4.2 in /php
2022-03-21 22:53:42 +01:00
dependabot[bot]
a89358ead8 Bump guzzlehttp/guzzle from 7.4.1 to 7.4.2 in /php
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.4.1 to 7.4.2.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.4.1...7.4.2)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 12:46:19 +00:00
Simon L
31bba7ab80 Merge pull request #399 from nextcloud/enh/396/support-windows-paths
add support for Windows paths
2022-03-21 12:07:17 +01:00
Simon L
7d49155fc1 Merge pull request #394 from nextcloud/enh/381/cleanup-interface-a-bit
clean up the AIO interface a bit
2022-03-21 12:07:04 +01:00
szaimen
9dfe5ab770 make port description better for talk
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-21 12:01:48 +01:00
szaimen
87e018b55f improve the open port documentation
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-19 07:42:03 +01:00
szaimen
fa916c95a7 improve some documentation
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-19 07:34:58 +01:00
szaimen
dbef6f1d4a move sections
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-19 06:34:13 +01:00
Simon L
fe83acd3cc Merge pull request #395 from nextcloud/enh/noid/windows-docs
add docs on how to run it on windows and improve macOS docs
2022-03-19 06:20:59 +01:00
szaimen
3a0ad6a66f add header
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-19 06:16:10 +01:00
szaimen
1976223efb improve issue templates
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-19 06:10:44 +01:00
szaimen
9ff9a7901c fix talk hpb
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-18 18:40:43 +01:00
Simon L
9c6425308f Merge pull request #402 from nextcloud/enh/400/increase-talk-hpb-limit
adjust talk hpb config
2022-03-18 16:17:38 +01:00
szaimen
52c926e052 adjust talk hpb config
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-18 16:13:56 +01:00
Simon L
1854417c28 Merge pull request #405 from nextcloud/dependabot/docker/Containers/nextcloud/php-8.0.17-fpm-alpine3.15
Bump php from 8.0.16-fpm-alpine3.15 to 8.0.17-fpm-alpine3.15 in /Containers/nextcloud
2022-03-18 13:33:27 +01:00
Simon L
9cc4393e99 Merge pull request #404 from nextcloud/dependabot/docker/Containers/mastercontainer/php-8.0.17-apache-bullseye
Bump php from 8.0.16-apache-bullseye to 8.0.17-apache-bullseye in /Containers/mastercontainer
2022-03-18 13:32:58 +01:00
Simon L
cfa207916e Merge pull request #403 from nextcloud/dependabot/docker/Containers/talk/ubuntu-focal-20220316
Bump ubuntu from focal-20220302 to focal-20220316 in /Containers/talk
2022-03-18 13:32:32 +01:00
dependabot[bot]
7586ecefad Bump php in /Containers/nextcloud
Bumps php from 8.0.16-fpm-alpine3.15 to 8.0.17-fpm-alpine3.15.

---
updated-dependencies:
- dependency-name: php
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-18 12:31:10 +00:00
dependabot[bot]
12e30fe316 Bump php in /Containers/mastercontainer
Bumps php from 8.0.16-apache-bullseye to 8.0.17-apache-bullseye.

---
updated-dependencies:
- dependency-name: php
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-18 12:31:00 +00:00
dependabot[bot]
4c50b606bc Bump ubuntu from focal-20220302 to focal-20220316 in /Containers/talk
Bumps ubuntu from focal-20220302 to focal-20220316.

---
updated-dependencies:
- dependency-name: ubuntu
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-18 12:30:55 +00:00
szaimen
38bd04ded9 add docs on how to run it on windows
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-18 11:44:53 +01:00
szaimen
95ba20d7f9 add support for Windows paths
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-18 11:15:26 +01:00
szaimen
ff042fc742 clean up the AIO interface a bit
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-18 11:03:46 +01:00
Simon L
8fedcb4810 Merge pull request #391 from nextcloud/dependabot/docker/Containers/watchtower/alpine-3.15.1
Bump alpine from 3.15.0 to 3.15.1 in /Containers/watchtower
2022-03-17 13:36:14 +01:00
Simon L
9a85799220 Merge pull request #390 from nextcloud/dependabot/docker/Containers/domaincheck/alpine-3.15.1
Bump alpine from 3.15.0 to 3.15.1 in /Containers/domaincheck
2022-03-17 13:36:04 +01:00
dependabot[bot]
7fc95050d4 Bump alpine from 3.15.0 to 3.15.1 in /Containers/watchtower
Bumps alpine from 3.15.0 to 3.15.1.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 12:33:25 +00:00
dependabot[bot]
666064389b Bump alpine from 3.15.0 to 3.15.1 in /Containers/domaincheck
Bumps alpine from 3.15.0 to 3.15.1.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 12:33:18 +00:00
Simon L
7c333037fc Merge pull request #385 from nextcloud/enh/366/macos
add docs for macOS and improve docker testing
2022-03-17 12:32:39 +01:00
Simon L
955692a874 Merge pull request #387 from nextcloud/dependabot/docker/Containers/borgbackup/debian-bullseye-20220316-slim
Bump debian from bullseye-20220125-slim to bullseye-20220316-slim in /Containers/borgbackup
2022-03-17 12:03:24 +01:00
dependabot[bot]
f2b26d262f Bump debian in /Containers/borgbackup
Bumps debian from bullseye-20220125-slim to bullseye-20220316-slim.

---
updated-dependencies:
- dependency-name: debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 11:01:22 +00:00
Simon L
c46b81da93 Merge pull request #388 from nextcloud/dependabot/docker/Containers/apache/debian-bullseye-20220316-slim
Bump debian from bullseye-20220228-slim to bullseye-20220316-slim in /Containers/apache
2022-03-17 12:00:45 +01:00
dependabot[bot]
be0bad4740 Bump debian in /Containers/apache
Bumps debian from bullseye-20220228-slim to bullseye-20220316-slim.

---
updated-dependencies:
- dependency-name: debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 10:57:30 +00:00
Simon L
f40f4a54b6 Merge pull request #384 from nextcloud/enh/noid/onlyoffice-talk-collabora
add onlyoffice and allow to disable talk and collabora
2022-03-17 11:57:10 +01:00
szaimen
1b86445b6a add onlyoffice and allow to disable talk and collabora
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-17 11:37:41 +01:00
szaimen
7bcd0c16c0 add docs for macOS and improve docker testing
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-17 10:58:04 +01:00
Simon L
68ac85e60b Merge pull request #380 from nextcloud/automated/noid/psalm-baseline-update-1647491101
[Automated] Update psalm-baseline.xml
2022-03-17 09:33:06 +01:00
nextcloud-command
8ce9bd2cc2 Update psalm baseline
Signed-off-by: GitHub <noreply@github.com>
2022-03-17 04:25:00 +00:00
szaimen
ea098a4d1a wait for clamav to become available
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-16 22:29:33 +01:00
szaimen
b5e45e270b increase version to v0.8.0
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-16 16:02:01 +01:00
Simon L
1fc8f2dd0f Merge pull request #339 from nextcloud/enh/noid/improve-logging
improve error logging in dockeractionmanager
2022-03-16 15:49:00 +01:00
Julius Härtl
8317b30658 Add error middleware
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-03-16 15:43:48 +01:00
szaimen
1a62857df7 improve error logging in dockeractionmanager
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-16 15:43:48 +01:00
szaimen
172ae49cdf improve/fix some things
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-16 14:41:52 +01:00
szaimen
d385d43af0 fix clamav build
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-16 13:38:23 +01:00
Simon L
064ea0f931 Merge pull request #378 from nextcloud/enh/376/add-clamav
add clamav as option
2022-03-16 13:17:33 +01:00
szaimen
7f645b1c1a fix psalm like this as no idea how to fix that
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-16 13:14:05 +01:00
szaimen
38726f039a add clamav as option
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-16 13:14:05 +01:00
Simon L
79fdbee6b4 Merge pull request #347 from nextcloud/enh/noid/move-inline-js-to-file
move inline javascript to its own file
2022-03-16 13:08:51 +01:00
szaimen
4c304d8775 move inline javascript to its own file
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-16 13:07:13 +01:00
Simon L
8a21f2a8f5 Merge pull request #377 from nextcloud/enh/noid/move-mastercontainer
move the mastercontainer section
2022-03-16 13:02:33 +01:00
Simon L
1be6c725c2 Merge pull request #379 from nextcloud/automated/noid/psalm-baseline-update-1647404662
[Automated] Update psalm-baseline.xml
2022-03-16 13:01:19 +01:00
nextcloud-command
c6d40e91e0 Update psalm baseline
Signed-off-by: GitHub <noreply@github.com>
2022-03-16 04:24:21 +00:00
szaimen
4fc4ca1e3e move the mastercontainer section
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-15 19:28:01 +01:00
Simon L
31f86c1570 Merge pull request #375 from nextcloud/enh/374/list-newest-backups-first
list newest backups first
2022-03-15 16:46:42 +01:00
Simon L
a8d380ec7a Merge pull request #370 from nextcloud/enh/noid/allow-upgrades-always
allow to upgrade the mastercontainer even if no update was found
2022-03-15 16:46:34 +01:00
Simon L
6dd88239d1 Merge pull request #372 from nextcloud/enh/noid/restarting-state
allow to check for restarting state
2022-03-15 16:46:02 +01:00
szaimen
ead69baae3 simplify syntax to make it better understandable
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-15 16:30:09 +01:00
szaimen
6be1154914 list newest backups first
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-15 16:02:43 +01:00
Simon L
f9772a856c Merge pull request #373 from nextcloud/aio-dependency-update
Dependency updates
2022-03-15 13:21:54 +01:00
szaimen
83ae27ef76 allow to check for restarting state
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-15 13:19:26 +01:00
szaimen
e60949aec9 dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-03-15 12:14:50 +00:00
Simon L
817df30465 Merge pull request #352 from nextcloud/enh/fix-domaincheck-startup
fix domaincheck startup
2022-03-15 12:25:55 +01:00
Simon L
07ad9a7eb8 Merge pull request #371 from nextcloud/automated/noid/psalm-baseline-update-1647318331
[Automated] Update psalm-baseline.xml
2022-03-15 10:25:07 +01:00
nextcloud-command
9c96806084 Update psalm baseline
Signed-off-by: GitHub <noreply@github.com>
2022-03-15 04:25:31 +00:00
szaimen
0e1edde3a7 allow to upgrade the mastercontainer even if no update was found
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-14 22:40:13 +01:00
szaimen
8661bdf020 run locking once a day
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-14 20:47:37 +01:00
szaimen
c3579476c6 improve logging of rate limit issues
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-14 17:20:45 +01:00
szaimen
ae349b8afb log if not pulling the latest database image
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-14 17:11:36 +01:00
Simon L
20bf2cfa7e Merge pull request #369 from nextcloud/enh/345/get-caddy-apcu-correctly
get caddy and apcu correctly
2022-03-14 16:43:21 +01:00
Simon L
0cbffeb90a Merge pull request #368 from nextcloud/enh/55/disallow-local-external-storage
Disallow creation of local external storage in some cases
2022-03-14 16:43:13 +01:00
szaimen
8983a97ef6 get caddy and apcu correctly
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-14 16:28:07 +01:00
szaimen
0670c7cedf Disallow creation of local external storage in some cases
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-14 15:35:37 +01:00
Simon L
cd00e5af83 Merge pull request #348 from nextcloud/enh/noid/refactor-some-logic
refactor some config logic
2022-03-14 15:17:48 +01:00
Simon L
2c7146b15f Merge pull request #343 from nextcloud/enh/340/add-headings
add some sensible headings
2022-03-14 15:02:38 +01:00
Simon L
975f4220d4 Merge pull request #338 from nextcloud/enh/noid/domain-change-docs
add docs for how to change domain in button
2022-03-14 15:01:47 +01:00
Simon L
6beaa3b391 Merge pull request #336 from nextcloud/enh/noid/allow-to-get-mastercontainer-logs
allow to get the mastercontainer logs from the frontend
2022-03-14 15:01:08 +01:00
Simon L
6b3cba411e Merge pull request #335 from nextcloud/enh/noid/disallow-database-update-if-failed
correctly disable database update if it failed before
2022-03-14 15:00:55 +01:00
szaimen
ab747de69d adress review
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-14 14:59:46 +01:00
szaimen
480b57178b lock closed issues after 14 days of inactivity
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-13 20:42:39 +01:00
szaimen
c9650aa0ef add issue templates and config
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-13 19:30:10 +01:00
szaimen
0e660f4c04 don't wait for collabora since we might allow to disable it in the future
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-13 18:31:07 +01:00
szaimen
6722dee1d6 fix attempt
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-12 22:50:34 +01:00
szaimen
79af222c2d fix startdomaincheckcontainer logic
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-12 22:50:34 +01:00
szaimen
79473fac76 refactor some config logic
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-11 17:28:55 +01:00
Simon L
9b11c817b2 Merge pull request #344 from nextcloud/dependabot/docker/Containers/mastercontainer/docker-20.10.13-dind-alpine3.15
Bump docker from 20.10.12-dind-alpine3.15 to 20.10.13-dind-alpine3.15 in /Containers/mastercontainer
2022-03-11 13:25:49 +01:00
dependabot[bot]
fb05818764 Bump docker in /Containers/mastercontainer
Bumps docker from 20.10.12-dind-alpine3.15 to 20.10.13-dind-alpine3.15.

---
updated-dependencies:
- dependency-name: docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-11 12:23:54 +00:00
szaimen
15a289e820 fix typo in backup script
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-11 09:27:38 +01:00
szaimen
d5868a9626 add some sensible headings
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-11 09:25:38 +01:00
szaimen
22d3b0ba30 allow to get the mastercontainer logs from the frontend
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-09 19:00:04 +01:00
szaimen
2b98a936b9 correctly disable database update if it failed before
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-09 18:31:44 +01:00
szaimen
3263184e8f add docs for how to change domain in button
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-09 17:12:16 +01:00
Simon L
85b445d576 Merge pull request #327 from nextcloud/enh/271/add-docs-for-datadir
add docs for changing the datadir
2022-03-09 15:29:16 +01:00
szaimen
52651559de don't allow to change the password if apache is starting
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-09 14:28:03 +01:00
szaimen
36fd28da6f fix styling for password change
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-09 14:18:51 +01:00
Simon L
77979aaa4a Merge pull request #334 from nextcloud/enh/noid/revert-migrating-borg-to-alpine
revert migrating borg to alpine
2022-03-09 13:52:42 +01:00
szaimen
5f753665ac revert migrating borg to alpine
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-09 13:49:09 +01:00
szaimen
e7ec998913 fix backup container build
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-09 13:23:44 +01:00
Simon L
91c7f13171 Merge pull request #332 from nextcloud/enh/noid/0.7.0
increase version to 0.7.0
2022-03-09 12:42:12 +01:00
Simon L
d170feb1e7 Merge pull request #326 from nextcloud/enh/271/allow-to-change-datadir
allow to change the location of Nextclouds datadir
2022-03-09 12:41:58 +01:00
Simon L
1a55b94b93 Merge pull request #330 from nextcloud/enh/noid/add-optional-section
add optional section
2022-03-09 12:41:38 +01:00
Simon L
a0656364b1 Merge pull request #329 from nextcloud/enh/272/allow-to-change-the-password
allow to change the password
2022-03-09 12:41:18 +01:00
Simon L
20c46a3809 Merge pull request #328 from nextcloud/enh/noid/check-startup-command
check if the startup command was executed successfully
2022-03-09 12:40:44 +01:00
Simon L
866519be88 Merge pull request #331 from nextcloud/enh/310/improve-domain-check
improve domain check
2022-03-09 12:40:22 +01:00
szaimen
cfc157f672 increase version to 0.7.0
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-09 12:39:51 +01:00
szaimen
8b813fe950 fix backup restore
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-09 12:37:43 +01:00
szaimen
c1a5262769 fix collabora
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-09 12:21:37 +01:00
szaimen
5b8de658c7 improve domain check
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-09 11:59:44 +01:00
szaimen
0b51eab553 add optional section
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-08 22:09:12 +01:00
szaimen
c8854ab1e3 allow to change the password
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-08 21:23:55 +01:00
szaimen
7a18cf766d check if the startup command was executed successfully
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-08 18:36:08 +01:00
szaimen
213de472a6 add docs for changing the datadir
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-08 17:53:03 +01:00
szaimen
c9be73601d catch the case that datadir and mount are equal
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-08 17:20:28 +01:00
szaimen
e2a6231257 allow to change the location of Nextclouds datadir
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-08 17:20:27 +01:00
Simon L
b929d57a77 Merge pull request #325 from nextcloud/enh/noid/correctly-delete-old-sessions
correctly delete sessions older than 24h
2022-03-08 15:50:56 +01:00
Simon L
0168b29882 Merge pull request #313 from nextcloud/enh/noid/database-safeguard
don't update database container if it failed before
2022-03-08 15:47:38 +01:00
Simon L
8836a884fb Merge pull request #306 from nextcloud/enh/205/migrate-borg-to-alpine
migrate borgbackup to alpine
2022-03-08 15:44:22 +01:00
Simon L
6adae6db3e Merge pull request #307 from nextcloud/enh/276/channel-and-changelog
show the current channel and add links to the changelogs
2022-03-08 15:43:37 +01:00
Simon L
0071703a24 Merge pull request #311 from nextcloud/aio-dependency-update
Dependency updates
2022-03-08 15:42:40 +01:00
Simon L
3af23d5a5c Merge pull request #312 from nextcloud/dependabot/docker/Containers/talk/ubuntu-focal-20220302
Bump ubuntu from focal-20220113 to focal-20220302 in /Containers/talk
2022-03-08 15:41:41 +01:00
szaimen
17eb732a89 correctly delete sessions older than 24h
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-08 15:32:09 +01:00
szaimen
68ddc72e9b don't update database container if it failed before
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-04 15:36:08 +01:00
dependabot[bot]
a03478c5d0 Bump ubuntu from focal-20220113 to focal-20220302 in /Containers/talk
Bumps ubuntu from focal-20220113 to focal-20220302.

---
updated-dependencies:
- dependency-name: ubuntu
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-04 13:00:16 +00:00
szaimen
6e8aea3aeb dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-03-04 12:14:44 +00:00
dependabot[bot]
2caa883453 Merge pull request #309 from nextcloud/dependabot/docker/Containers/collabora/collabora/code-21.11.2.4.1 2022-03-03 12:38:25 +00:00
dependabot[bot]
1edcc4ef5f Bump collabora/code in /Containers/collabora
Bumps collabora/code from 21.11.2.3.1 to 21.11.2.4.1.

---
updated-dependencies:
- dependency-name: collabora/code
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-03 12:27:42 +00:00
Simon L
10f62ac401 Merge pull request #301 from nextcloud/enh/noid/improve-update-check
also show up-to-date if the checks return null
2022-03-02 18:28:47 +01:00
Simon L
f8f50e9186 Merge pull request #305 from nextcloud/enh/299/sync-to-other-drive
add docs for additional backup sync to another drive
2022-03-02 18:28:32 +01:00
Simon L
a3e3dd4534 Merge pull request #297 from nextcloud/dependabot/docker/Containers/apache/debian-bullseye-20220228-slim
Bump debian from bullseye-20220125-slim to bullseye-20220228-slim in /Containers/apache
2022-03-02 18:27:27 +01:00
Simon L
a6286a291f Merge pull request #298 from nextcloud/dependabot/docker/Containers/collabora/collabora/code-21.11.2.3.1
Bump collabora/code from 21.11.2.2.1 to 21.11.2.3.1 in /Containers/collabora
2022-03-02 18:25:54 +01:00
Simon L
2dbd3a5f71 Merge pull request #252 from nextcloud/enh/1902/customize-collabora
customize collabora a bit
2022-03-02 17:23:31 +01:00
szaimen
c1e2446d22 customize collabora a bit
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-02 17:15:00 +01:00
szaimen
6232000e31 show the current channel and add links to the changelogs
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-02 15:49:34 +01:00
szaimen
7c20d54dd0 add docs for additional backup sync to another drive
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-02 15:30:02 +01:00
szaimen
8ce55a1334 migrate borgbackup to alpine
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-02 15:21:34 +01:00
Simon L
853a880c9d Merge pull request #286 from nextcloud/enh/noid/reverse-proxy-docs
add reverse proxy docs
2022-03-01 15:12:58 +01:00
Simon L
0ecd2c8f78 Merge pull request #289 from nextcloud/enh/273/lxc-docs
Add docs on backup container inside LXC containers
2022-03-01 15:12:38 +01:00
Simon L
24d1451325 Merge pull request #294 from nextcloud/automated/noid/psalm-baseline-update-1646132431
[Automated] Update psalm-baseline.xml
2022-03-01 15:12:27 +01:00
szaimen
8149c0de75 also show up-to-date if the checks return null
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-01 15:11:46 +01:00
dependabot[bot]
34660f3d17 Bump debian in /Containers/apache
Bumps debian from bullseye-20220125-slim to bullseye-20220228-slim.

---
updated-dependencies:
- dependency-name: debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 12:29:23 +00:00
dependabot[bot]
d360031f12 Bump collabora/code in /Containers/collabora
Bumps collabora/code from 21.11.2.2.1 to 21.11.2.3.1.

---
updated-dependencies:
- dependency-name: collabora/code
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 12:29:23 +00:00
Simon L
efde2ab41a Merge pull request #295 from nextcloud/enh/noid/increase-version
increase version to v0.6.0
2022-03-01 12:06:26 +01:00
szaimen
a89c183508 increase version to v0.6.0
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-01 12:05:54 +01:00
nextcloud-command
301b6e6297 Update psalm baseline
Signed-off-by: GitHub <noreply@github.com>
2022-03-01 11:00:30 +00:00
Simon L
6e839f5baf Merge pull request #293 from nextcloud/enh/noid/fix-some-psalm-issues
fix some psalm issues
2022-03-01 11:57:24 +01:00
szaimen
edb8bd228b fix some psalm issues
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-01 11:44:59 +01:00
Simon L
23429f3e59 Merge pull request #291 from nextcloud/enh/265/upgrade-postgres
update postgres to 14.2
2022-03-01 11:20:19 +01:00
Simon L
f4130a8475 Merge pull request #290 from nextcloud/enh/278/delete-backup-archives
add docs on how to delete backup archives manually
2022-03-01 11:10:30 +01:00
szaimen
e5aa3757d5 add docs on how to delete backup archives manually
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-01 11:07:38 +01:00
szaimen
12f1549221 update postgres to 14.2
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-01 10:16:32 +01:00
szaimen
d34167b30f Add docs on backup container inside LXC containers
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-01 09:38:51 +01:00
Simon L
5e0118a3b5 Merge pull request #287 from nextcloud/automated/noid/psalm-baseline-update-1646108969
[Automated] Update psalm-baseline.xml
2022-03-01 09:11:37 +01:00
nextcloud-command
220194b409 Update psalm baseline
Signed-off-by: GitHub <noreply@github.com>
2022-03-01 04:29:29 +00:00
szaimen
2943c6cf08 add reverse proxy docs
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-03-01 00:25:03 +01:00
szaimen
2040553822 fix the access rights
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-28 19:36:19 +01:00
Simon L
d1656a0fcb Merge pull request #70 from nextcloud/enh/noid/allow-reverse-proxies
allow to run this behind a reverse proxy
2022-02-28 18:55:03 +01:00
szaimen
6e9261f306 allow to run this behind a reverse proxy
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-28 18:44:35 +01:00
szaimen
269f62615f update psalm container regularly
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-28 18:13:26 +01:00
szaimen
704c4ad331 fix sarif upload
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-28 17:49:42 +01:00
Simon L
9afec142f3 Merge pull request #285 from nextcloud/automated/noid/psalm-baseline-update-1646065523
[Automated] Update psalm-baseline.xml
2022-02-28 17:45:16 +01:00
nextcloud-command
9fbcaae567 Update psalm baseline
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-28 17:42:45 +01:00
szaimen
82c371b519 fix the update-baseline-workflow
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-28 17:30:45 +01:00
Simon L
2afc711983 Merge pull request #283 from nextcloud/enh/noid/update-baseline
add workflow that updates psalm baseline regularly
2022-02-28 17:02:52 +01:00
szaimen
a42f21555a add workflow that updates psalm baseline regularly
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-28 17:01:12 +01:00
Simon L
d6ece6cad8 Merge pull request #210 from nextcloud/enh/207/set-up-psalm
set up psalm
2022-02-28 16:58:21 +01:00
szaimen
6f1da5fc5d set up psalm
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-28 16:55:06 +01:00
szaimen
2024cb8f26 add apcu into the psalm container
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-28 15:45:02 +01:00
Simon L
1c01e9e21f Merge pull request #282 from nextcloud/enh/noid/create-psalm-container
create our own psalm container
2022-02-28 15:30:30 +01:00
szaimen
628e55f076 create our own psalm container
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-28 15:27:02 +01:00
Simon L
5b49faf3b7 Merge pull request #274 from nextcloud/aio-dependency-update
Dependency updates
2022-02-28 14:43:12 +01:00
szaimen
33a73a7b95 dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-02-27 12:15:24 +00:00
szaimen
e2086ada2b make clear that the external storage app is not covered by the built-in backup solution
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-24 01:27:14 +01:00
szaimen
c15bc86e06 make clear that the external mount point will not be covered by the built-in backup solution
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-24 01:10:25 +01:00
Simon L
ccc80c44cc Merge pull request #255 from nextcloud/enh/76/add-docs
add some docs on how to allow the Nextcloud container to access direc…
2022-02-23 19:32:50 +01:00
Simon L
d12df52864 Merge pull request #269 from nextcloud/increase-to-0.5.0
increase version to v0.5.0
2022-02-23 18:48:24 +01:00
szaimen
5ed19687e2 increase version to v0.5.0
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-23 18:47:29 +01:00
Simon L
af93aeebd7 Merge pull request #254 from nextcloud/enh/76/allow-to-define-a-nextcloud-mountpoint
allow nextcloud to access outside directories
2022-02-23 18:11:35 +01:00
Simon L
aa366556f5 Merge pull request #266 from nextcloud/enh/263/move-trusted-proxies
move trusted_proxies to entrypoint
2022-02-23 18:09:42 +01:00
Simon L
a88000095a Merge pull request #253 from nextcloud/enh/244/enforce-startup-order
enforce startup order
2022-02-23 18:09:27 +01:00
Simon L
15e914e3f4 Merge pull request #267 from nextcloud/aio-dependency-update
Dependency updates
2022-02-23 18:08:38 +01:00
Simon L
472334948c Merge pull request #256 from nextcloud/dependabot/docker/Containers/collabora/collabora/code-21.11.2.2.1
Bump collabora/code from 21.11.1.4.1 to 21.11.2.2.1 in /Containers/collabora
2022-02-23 18:08:02 +01:00
Simon L
663901cacd Merge pull request #260 from nextcloud/dependabot/docker/Containers/mastercontainer/php-8.0.16-apache-bullseye
Bump php from 8.0.15-apache-bullseye to 8.0.16-apache-bullseye in /Containers/mastercontainer
2022-02-23 18:07:49 +01:00
Simon L
6f0e4dc175 Merge pull request #261 from nextcloud/dependabot/docker/Containers/nextcloud/php-8.0.16-fpm-alpine3.15
Bump php from 8.0.15-fpm-alpine3.15 to 8.0.16-fpm-alpine3.15 in /Containers/nextcloud
2022-02-23 18:07:35 +01:00
Simon L
b0894992b4 Merge pull request #262 from nextcloud/dependabot/docker/Containers/postgresql/postgres-13.6-alpine3.15
Bump postgres from 13.5-alpine3.15 to 13.6-alpine3.15 in /Containers/postgresql
2022-02-23 18:07:18 +01:00
Simon L
748dcea39e Merge pull request #246 from nextcloud/enh/219/do-not-disconnect-from-network
Do not disconnect containers from network
2022-02-23 18:05:02 +01:00
Simon L
5b278ca261 Merge pull request #268 from nextcloud/fix/241/validate-ip-address
ip-addresses are not supported as domain
2022-02-23 18:04:10 +01:00
szaimen
d988706ae0 ip-addresses are not supported as domain
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-23 18:01:56 +01:00
szaimen
73193ee2d5 dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-02-23 12:16:38 +00:00
szaimen
e955b0a96f move trusted_proxies to entrypoint
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-22 13:26:48 +01:00
Simon L
11edcfe142 Merge pull request #250 from nextcloud/enh/234/skeleton-dir-docs
add documentation for skeleton directory
2022-02-22 11:30:07 +01:00
szaimen
c779c91ef6 enforce startup order
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-21 20:00:35 +01:00
dependabot[bot]
3b177a5f55 Bump php in /Containers/nextcloud
Bumps php from 8.0.15-fpm-alpine3.15 to 8.0.16-fpm-alpine3.15.

---
updated-dependencies:
- dependency-name: php
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 17:59:20 +00:00
dependabot[bot]
72f7106911 Bump php in /Containers/mastercontainer
Bumps php from 8.0.15-apache-bullseye to 8.0.16-apache-bullseye.

---
updated-dependencies:
- dependency-name: php
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 17:59:14 +00:00
dependabot[bot]
cbfe9c1907 Bump postgres in /Containers/postgresql
Bumps postgres from 13.5-alpine3.15 to 13.6-alpine3.15.

---
updated-dependencies:
- dependency-name: postgres
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 17:54:31 +00:00
szaimen
db12a9a90b ignore major version updates for specific containers
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-21 18:53:51 +01:00
dependabot[bot]
c777971906 Bump collabora/code in /Containers/collabora
Bumps collabora/code from 21.11.1.4.1 to 21.11.2.2.1.

---
updated-dependencies:
- dependency-name: collabora/code
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 17:26:52 +00:00
szaimen
0b8caa8cea fix dependabot formatting
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-21 18:26:00 +01:00
szaimen
eafe011ae9 add some docs on how to allow the Nextcloud container to access directories on the host
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-21 18:08:31 +01:00
szaimen
bc50b0cc4f allow nextcloud to access outside directories
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-21 17:31:05 +01:00
Simon L
a2f60ba765 Merge pull request #248 from nextcloud/fix/2200/fix-dependabot
fix dependabot
2022-02-21 15:54:16 +01:00
szaimen
487688d000 add documentation for skeleton directory
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-21 14:33:14 +01:00
szaimen
30e2c6be25 fix typo in readme
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-21 14:18:46 +01:00
szaimen
777666cf11 fix dependabot
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-21 14:09:22 +01:00
szaimen
221ab2515d Do not disconnect containers from network
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-21 14:01:27 +01:00
Simon L
ac3b8bc963 Merge pull request #238 from nextcloud/enh/noid/add-backup-pro-tip
Add instructions how to open the backup archives on the host
2022-02-21 13:32:53 +01:00
szaimen
1df46bb805 Add instructions how to open the backup archives on the host
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-21 13:32:18 +01:00
Simon L
89830a1b81 Merge pull request #237 from nextcloud/fix/235/fix-database-import
fix database import by waiting for the database to start
2022-02-18 11:44:12 +01:00
szaimen
48e60872b3 fix database import by waiting for the database to start
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-18 11:41:52 +01:00
Simon L
9d9da9e47c Merge pull request #230 from nextcloud/enh/noid/update-version
update version to 0.4.0
2022-02-16 16:30:44 +01:00
szaimen
3a9c305758 update version to 0.4.0
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-16 16:29:47 +01:00
szaimen
8f1fcde006 fix selecting a backup container
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-16 16:26:35 +01:00
Simon L
8a6de8f63c Merge pull request #65 from nextcloud/enh/39/allow-to-select-archive
allow to select the archive to restore from
2022-02-16 14:43:10 +01:00
szaimen
0880aff7ea adress review
Signed-off-by: szaimen <szaimen@e.mail.de>
Co-Authored-By: Carl Schwan <carl@carlschwan.eu>
2022-02-16 14:34:21 +01:00
Simon L
2c3db2fd40 Merge pull request #229 from nextcloud/nextcloud-container-update
Nextcloud update
2022-02-16 13:39:37 +01:00
szaimen
e357fc8bb9 nextcloud-update automated change
Signed-off-by: GitHub <noreply@github.com>
2022-02-16 12:33:48 +00:00
Simon L
a82b86b915 Merge pull request #222 from nextcloud/aio-dependency-update
Dependency updates
2022-02-16 13:28:10 +01:00
szaimen
67705134cf dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-02-16 12:13:04 +00:00
Simon L
ce15c64cd9 Merge pull request #228 from nextcloud/enh/noid/update-nextcloud
update nextcloud to 23.0.2
2022-02-16 12:19:41 +01:00
szaimen
92492affe4 update nextcloud to 23.0.2
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-16 12:18:46 +01:00
szaimen
63e0849215 allow to select the archive to restore from
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-16 12:00:54 +01:00
szaimen
1515d0c210 another attempt to fix the database import
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-15 18:57:39 +01:00
Simon L
4359792a48 Merge pull request #226 from nextcloud/enh/noid/fix-database-import
fix database import
2022-02-15 17:44:36 +01:00
szaimen
3887275808 fix database import
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-15 17:44:00 +01:00
szaimen
badd8d02a9 update to 0.3.1
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-15 12:56:44 +01:00
Simon L
5bc10a56ed Merge pull request #218 from nextcloud/enh/noid/fix-database-connection
fix the database connection
2022-02-15 12:15:39 +01:00
Simon L
222dcd3317 Merge pull request #221 from nextcloud/aio-dependency-update
Dependency updates
2022-02-13 13:43:13 +01:00
szaimen
cec86aa825 dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-02-13 12:11:36 +00:00
szaimen
e7dfb2514b fix the database connection
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-13 11:44:59 +01:00
szaimen
b0e570176b fix redis build
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-12 14:24:11 +01:00
szaimen
7756826eb3 revert the removal for now since it would break all instances
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-12 01:02:39 +01:00
szaimen
836552e1a7 verbose output
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-12 00:26:12 +01:00
szaimen
6e22b364ae postgresql - delete the datadir once
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-11 23:53:50 +01:00
Simon L
4979d1d90e Merge pull request #214 from nextcloud/enh/131/use-dependabot-to-update-containers
use dependabot to update containers
2022-02-11 18:42:45 +01:00
szaimen
3029b277f1 use dependabot to update containers
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-11 15:47:49 +01:00
97 changed files with 3185 additions and 555 deletions

32
.github/ISSUE_TEMPLATE/Bug_report.md vendored Normal file
View File

@@ -0,0 +1,32 @@
---
name: 🐛 Bug report
about: Help us improving by reporting a bug
labels: bug, 0. Needs triage
---
<!--- Please keep this note for other contributors -->
### How to use GitHub
* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are affected by the same issue.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.
<!--- Please fill out the whole template below -->
### Steps to reproduce
1.
2.
3.
### Expected behavior <!--- Tell us what should happen -->
### Actual behavior <!--- Tell us what happens instead -->
### Host OS <!--- (the host OS on which you are trying to install AIO on) -->
#### Nextcloud AIO version <!--- (see Nextcloud AIO interface) -->
#### Current channel <!--- (see the channel name in the AIO interface) -->
#### Other valuable info <!--- (like logs, screenshots & Co.) -->

View File

@@ -0,0 +1,24 @@
---
name: 📖 Existing feature/documentation enhancement
about: Suggest an enhancement of an existing feature/documentation - for other types, please use the feature request option below
labels: enhancement, 0. Needs triage
---
<!--- Please keep this note for other contributors -->
### How to use GitHub
* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are interested into the same feature.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.
<!--- Please fill out the whole template below -->
### Is your feature request related to a problem? Please describe.
<!--- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
### Describe the solution you'd like
<!--- A clear and concise description of what you want to happen. -->
### Describe alternatives you've considered
<!--- A clear and concise description of any alternative solutions or features you've considered. -->
### Additional context
<!--- Add any other context or screenshots about the feature request below. -->

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

@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: 💡 Suggest a new feature or discuss one
url: https://github.com/nextcloud/all-in-one/discussions/categories/ideas
about: For new feature requests and discussion of existing ones
- name: ❓ Questions on AIO
url: https://github.com/nextcloud/all-in-one/discussions/categories/questions
about: For questions regarding AIO
- name: ⛑️ Community Support and Help
url: https://help.nextcloud.com/tag/aio
about: For other types of questions
- name: 💼 Nextcloud Enterprise
url: https://portal.nextcloud.com/
about: If you are a Nextcloud Enterprise customer, or need Professional support, so it can be resolved directly by our dedicated engineers more quickly

128
.github/dependabot.yml vendored
View File

@@ -1,12 +1,132 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/php/"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/apache"
schedule:
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/borgbackup"
schedule:
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/collabora"
schedule:
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/domaincheck"
schedule:
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/mastercontainer"
schedule:
interval: "daily"
time: "12:00"
ignore:
- dependency-name: "php"
update-types: ["version-update:semver-major", "version-update:semver-minor"]
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/nextcloud"
schedule:
interval: "daily"
time: "12:00"
ignore:
- dependency-name: "php"
update-types: ["version-update:semver-major", "version-update:semver-minor"]
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/postgresql"
schedule:
interval: "daily"
time: "12:00"
ignore:
- dependency-name: "postgres"
update-types: ["version-update:semver-major"]
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/redis"
schedule:
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/talk"
schedule:
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/watchtower"
schedule:
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/clamav"
schedule:
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
directory: "/Containers/onlyoffice"
schedule:
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
labels:
- 3. to review

View File

@@ -0,0 +1,54 @@
name: Create Psalm Container
on:
workflow_dispatch:
schedule:
- cron: '5 4 * * *'
jobs:
push_to_registry:
runs-on: ubuntu-latest
name: Create Psalm Container
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
run: |
git clone https://github.com/psalm/psalm-github-actions.git
- name: Modify the Dockerfile
run: |
set -x
sed -i 's|FROM php:7.4-alpine|FROM php:8.0-alpine|' "psalm-github-actions/Dockerfile"
cat << APCU >> "psalm-github-actions/Dockerfile"
RUN mkdir -p /usr/src/php/ext/apcu && \
curl -fsSL https://pecl.php.net/get/apcu | tar xvz -C "/usr/src/php/ext/apcu" --strip 1 && \
docker-php-ext-install apcu
APCU
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container image
uses: docker/build-push-action@v2
with:
push: true
context: 'psalm-github-actions'
file: 'psalm-github-actions/Dockerfile'
tags: |
ghcr.io/nextcloud/all-in-one-psalm:latest

View File

@@ -9,7 +9,7 @@ jobs:
name: Run dependency update script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: nanasess/setup-php@master
with:
php-version: '8.0'
@@ -31,8 +31,20 @@ jobs:
done
echo "outdated dependencies:
$(composer outdated)"
- name: Update apcu
run: |
# APCU
apcu_version="$(
git ls-remote --tags https://github.com/krakjoe/apcu.git \
| cut -d/ -f3 \
| grep -viE -- 'rc|b' \
| sed -E 's/^v//' \
| sort -V \
| tail -1
)"
sed -i "s|pecl install APCu.*\;|pecl install APCu-$apcu_version\;|" ./Containers/mastercontainer/Dockerfile
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v4
with:
commit-message: dependency updates
signoff: true

20
.github/workflows/lock-threads.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: 'Lock Threads'
on:
schedule:
- cron: '0 0 * * *'
permissions:
issues: write
concurrency:
group: lock
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3
with:
issue-inactive-days: '14'
process-only: 'issues'

View File

@@ -10,7 +10,7 @@ jobs:
name: Run nextcloud-update script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run nextcloud-update script
run: |
# Inspired by https://github.com/nextcloud/docker/blob/master/update.sh
@@ -19,7 +19,7 @@ jobs:
apcu_version="$(
git ls-remote --tags https://github.com/krakjoe/apcu.git \
| cut -d/ -f3 \
| grep -vE -- '-rc|-b' \
| grep -viE -- 'rc|b' \
| sed -E 's/^v//' \
| sort -V \
| tail -1
@@ -30,7 +30,7 @@ jobs:
memcached_version="$(
git ls-remote --tags https://github.com/php-memcached-dev/php-memcached.git \
| cut -d/ -f3 \
| grep -vE -- '-rc|-b' \
| grep -viE -- 'rc|b' \
| sed -E 's/^[rv]//' \
| sort -V \
| tail -1
@@ -60,11 +60,12 @@ jobs:
sed -i "s|pecl install imagick.*\;|pecl install imagick-$imagick_version\;|" ./Containers/nextcloud/Dockerfile
# Nextcloud
NCVERSION=$(curl -s -m 900 https://download.nextcloud.com/server/releases/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | sort --version-sort | tail -1)
NC_MAJOR="$(grep "ENV NEXTCLOUD_VERSION" ./Containers/nextcloud/Dockerfile | grep -oP '[23][0-9]')"
NCVERSION=$(curl -s -m 900 https://download.nextcloud.com/server/releases/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | grep "$NC_MAJOR" | sort --version-sort | tail -1)
sed -i "s|^ENV NEXTCLOUD_VERSION.*|ENV NEXTCLOUD_VERSION $NCVERSION|" ./Containers/nextcloud/Dockerfile
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v4
with:
commit-message: nextcloud-update automated change
signoff: true

18
.github/workflows/psalm-analysis.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Psalm Analysis
on:
pull_request:
push:
jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Psalm
uses: docker://ghcr.io/nextcloud/all-in-one-psalm
with:
composer_ignore_platform_reqs: false
relative_dir: php

25
.github/workflows/psalm-security.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Psalm Security Analysis
on:
push:
branches:
- main
jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Psalm
uses: docker://ghcr.io/nextcloud/all-in-one-psalm
with:
relative_dir: php
security_analysis: true
composer_ignore_platform_reqs: false
report_file: results.sarif
- name: Upload Security Analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: php/results.sarif

View File

@@ -0,0 +1,48 @@
name: Update Psalm baseline
on:
workflow_dispatch:
schedule:
- cron: '5 4 * * *'
jobs:
update-psalm-baseline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up php8.0
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
extensions: apcu
coverage: none
- name: Run script
run: |
set -x
cd php
composer global require vimeo/psalm --prefer-dist --no-progress --dev
composer install
composer run psalm -- --monochrome --no-progress --output-format=text --update-baseline
git clean -f lib/composer
git checkout composer.json composer.lock lib/composer
continue-on-error: true
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: Update psalm baseline
committer: GitHub <noreply@github.com>
author: nextcloud-command <nextcloud-command@users.noreply.github.com>
signoff: true
branch: automated/noid/psalm-baseline-update
# Make sure we can open multiple PRs
branch-suffix: timestamp
title: '[Automated] Update psalm-baseline.xml'
body: |
Auto-generated update psalm-baseline.xml with fixed psalm warnings
labels: |
3. to review

View File

@@ -9,7 +9,7 @@ jobs:
name: Github Actions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run Shellcheck
uses: ludeeus/action-shellcheck@master
with:

View File

@@ -10,7 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: spelling or typos
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: fix permission for reviewdog
run: sudo chown -R root:root $GITHUB_WORKSPACE
- name: misspell
uses: reviewdog/action-misspell@v1
with:

View File

@@ -6,7 +6,7 @@
}
}
https://{$NC_DOMAIN}:443 {
{$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} {
# Notify Push
route /push/* {
@@ -22,24 +22,20 @@ https://{$NC_DOMAIN}:443 {
# Collabora
route /browser/* {
reverse_proxy https://{$COLLABORA_HOST}:9980 {
transport http {
tls_insecure_skip_verify
}
}
reverse_proxy {$COLLABORA_HOST}:9980
}
route /hosting/* {
reverse_proxy https://{$COLLABORA_HOST}:9980 {
transport http {
tls_insecure_skip_verify
}
}
reverse_proxy {$COLLABORA_HOST}:9980
}
route /cool/* {
reverse_proxy https://{$COLLABORA_HOST}:9980 {
transport http {
tls_insecure_skip_verify
}
reverse_proxy {$COLLABORA_HOST}:9980
}
# Onlyoffice
route /onlyoffice/* {
uri strip_prefix /onlyoffice
reverse_proxy {$ONLYOFFICE_HOST}:80 {
header_up X-Forwarded-Host {http.request.host}/onlyoffice
}
}

View File

@@ -1,4 +1,7 @@
FROM debian:bullseye-slim
# Caddy is a requirement
FROM caddy:2.5.1-alpine as caddy
FROM debian:bullseye-20220418-slim
EXPOSE 80
@@ -21,10 +24,8 @@ RUN set -ex; \
; \
rm -rf /var/lib/apt/lists/*
RUN set -ex; \
wget "https://caddyserver.com/api/download?os=linux&arch=$(dpkg-architecture --query DEB_BUILD_ARCH)" -O "/usr/bin/caddy" \
&& chmod +x /usr/bin/caddy \
&& /usr/bin/caddy version
COPY --from=caddy /usr/bin/caddy /usr/bin/
RUN chmod +x /usr/bin/caddy
RUN a2enmod rewrite \
headers \
@@ -39,12 +40,13 @@ RUN a2enmod rewrite \
COPY nextcloud.conf /etc/apache2/sites-available/
RUN a2dissite 000-default && \
RUN set -ex; \
a2dissite 000-default && \
a2dissite default-ssl && \
a2ensite nextcloud.conf && \
rm -rf /var/www/html/* && \
service apache2 restart; \
chown www-data:www-data -R /var/log/apache2; \
mkdir -p /var/run/apache2; \
chown -R www-data:www-data /var/run/apache2; \
chown -R www-data:www-data /var/www;
@@ -59,7 +61,9 @@ COPY start.sh /usr/bin/
COPY supervisord.conf /
RUN chmod +x /usr/bin/start.sh; \
chmod +r /supervisord.conf; \
chmod +r /Caddyfile;
chmod a+w /Caddyfile; \
chmod 777 /; \
chmod +r -R /etc/apache2
# Give root a random password
RUN echo "root:$(openssl rand -base64 12)" | chpasswd

View File

@@ -17,11 +17,18 @@ while ! nc -z "$NEXTCLOUD_HOST" 9000; do
sleep 5
done
# Only start container if collabora is started
while ! nc -z "$COLLABORA_HOST" 9980; do
echo "Waiting for Collabora to start..."
sleep 5
done
if [ -z "$APACHE_PORT" ]; then
export APACHE_PORT="443"
fi
if [ "$APACHE_PORT" != '443' ]; then
export PROTOCOL="http"
export NC_DOMAIN=""
sed -i 's|auto_https.*|auto_https off|' /Caddyfile
else
export PROTOCOL="https"
sed -i 's|auto_https.*|auto_https disable_redirects|' /Caddyfile
fi
# Add caddy path
mkdir -p /mnt/data/caddy/

View File

@@ -1,4 +1,4 @@
FROM debian:bullseye-slim
FROM debian:bullseye-20220418-slim
RUN set -ex; \
\
@@ -8,6 +8,7 @@ RUN set -ex; \
rsync \
fuse \
python3-llfuse \
jq \
; \
rm -rf /var/lib/apt/lists/*

View File

@@ -1,13 +1,9 @@
#!/bin/bash
# Variables
BORG_BACKUP_DIRECTORY="/mnt/borgbackup/borg"
# Functions
get_start_time(){
START_TIME=$(date +%s)
CURRENT_DATE=$(date --date @"$START_TIME" +"%Y%m%d_%H%M%S")
CURRENT_DATE_READABLE=$(date --date @"$START_TIME" +"%d.%m.%Y - %H:%M:%S")
}
get_expiration_time() {
END_TIME=$(date +%s)
@@ -19,11 +15,6 @@ get_expiration_time() {
DURATION_READABLE=$(printf "%02d hours %02d minutes %02d seconds" $DURATION_HOUR $DURATION_MIN $DURATION_SEC)
}
# Export defaults
export BORG_PASSPHRASE="$BORG_PASSWORD"
export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes
export BORG_RELOCATED_REPO_ACCESS_IS_OK=yes
# Test if all volumes aren't empty
VOLUME_DIRS="$(find /nextcloud_aio_volumes -mindepth 1 -maxdepth 1 -type d)"
mapfile -t VOLUME_DIRS <<< "$VOLUME_DIRS"
@@ -41,7 +32,7 @@ if ! mountpoint -q /mnt/borgbackup; then
fi
# Check if target is empty
if [ "$BORG_MODE" != backup ] && ! [ -f "$BORG_BACKUP_DIRECTORY/config" ]; then
if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != test ] && ! [ -f "$BORG_BACKUP_DIRECTORY/config" ]; then
echo "The repository is empty. cannot perform check or restore."
exit 1
fi
@@ -150,9 +141,6 @@ if [ "$BORG_MODE" = backup ]; then
# Remove the update skip file because the backup was successful
rm -f "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
echo "$CURRENT_DATE,$CURRENT_DATE_READABLE" >> "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
chmod +r "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
# Prune options
BORG_PRUNE_OPTS=(--stats --progress --keep-within=7d --keep-weekly=4 --keep-monthly=6 "$BORG_BACKUP_DIRECTORY")
@@ -172,27 +160,71 @@ fi
# Do the restore
if [ "$BORG_MODE" = restore ]; then
get_start_time
echo "Restoring the last backup..."
# Perform the restore
FIRST_ARCHIVE="$(borg list "$BORG_BACKUP_DIRECTORY" | grep "nextcloud-aio" | awk -F " " '{print $1}' | sort -r | head -1)"
if [ -n "$SELECTED_RESTORE_TIME" ]; then
SELECTED_ARCHIVE="$(borg list "$BORG_BACKUP_DIRECTORY" | grep "nextcloud-aio" | grep "$SELECTED_RESTORE_TIME" | awk -F " " '{print $1}' | head -1)"
else
SELECTED_ARCHIVE="$(borg list "$BORG_BACKUP_DIRECTORY" | grep "nextcloud-aio" | awk -F " " '{print $1}' | sort -r | head -1)"
fi
echo "Restoring '$SELECTED_ARCHIVE'..."
mkdir -p /tmp/borg
if ! borg mount "$BORG_BACKUP_DIRECTORY::$FIRST_ARCHIVE" /tmp/borg; then
if ! borg mount "$BORG_BACKUP_DIRECTORY::$SELECTED_ARCHIVE" /tmp/borg; then
echo "Could not mount the backup!"
exit 1
fi
# Restore everything except the configuration file
if ! rsync --stats --archive --human-readable -vv --delete \
--exclude "nextcloud_aio_mastercontainer/data/backup_archives.list" \
--exclude "nextcloud_aio_mastercontainer/session/"** \
--exclude "nextcloud_aio_mastercontainer/certs/"** \
--exclude "nextcloud_aio_mastercontainer/data/daily_backup_running" \
--exclude "nextcloud_aio_mastercontainer/data/configuration.json" \
/tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then
echo "Something failed while restoring the boot partition."
echo "Something failed while restoring from backup."
umount /tmp/borg
exit 1
fi
umount /tmp/borg
# TODO: reset fetchtimes in configuration.json so that it doesn't get the latest directly...
# Save current aio password
AIO_PASSWORD="$(jq '.password' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
# Save current path
BORG_LOCATION="$(jq '.borg_backup_host_location' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
# Save current nextcloud datadir
if grep -q '"nextcloud_datadir":' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json; then
NEXTCLOUD_DATADIR="$(jq '.nextcloud_datadir' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
else
NEXTCLOUD_DATADIR='""'
fi
# Restore the configuration file
if ! rsync --archive --human-readable -vv \
/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json \
/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json; then
echo "Something failed while restoring the configuration.json."
umount /tmp/borg
exit 1
fi
# Set backup-mode to restore since it was a restore
CONTENTS="$(jq '."backup-mode" = "restore"' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
echo -E "${CONTENTS}" > /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json
# Reset the backup path to the currently used one
CONTENTS="$(jq ".borg_backup_host_location = $BORG_LOCATION" /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
echo -E "${CONTENTS}" > /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json
# Reset the AIO password to the currently used one
CONTENTS="$(jq ".password = $AIO_PASSWORD" /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
echo -E "${CONTENTS}" > /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json
# Reset the datadir to the one that was used for the restore
CONTENTS="$(jq ".nextcloud_datadir = $NEXTCLOUD_DATADIR" /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
echo -E "${CONTENTS}" > /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json
umount /tmp/borg
# Inform user
get_expiration_time
@@ -202,16 +234,15 @@ if [ "$BORG_MODE" = restore ]; then
touch "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
chmod 777 "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
# Set backup-mode to restore since it was a restore
sed -i 's/"backup-mode":"[a-z]\+"/"backup-mode":"restore"/g' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json
exit 0
# Add file to Nextcloud container so that it performs a fingerprint update the next time
touch "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/fingerprint.update"
chmod 777 "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/fingerprint.update"
fi
# Do the Backup check
if [ "$BORG_MODE" = check ]; then
get_start_time
echo "Checking the backup integity..."
echo "Checking the backup integrity..."
# Perform the check
if ! borg check --verify-data --progress "$BORG_BACKUP_DIRECTORY"; then
@@ -224,3 +255,27 @@ if [ "$BORG_MODE" = check ]; then
echo "Check finished successfully on $END_DATE_READABLE ($DURATION_READABLE)"
exit 0
fi
# Do the backup test
if [ "$BORG_MODE" = test ]; then
if ! [ -d "$BORG_BACKUP_DIRECTORY" ]; then
echo "No 'borg' directory in the given backup directory found!"
echo "Only the files/folders below have been found in the given directory."
ls -a "$MOUNT_DIR"
echo "Please adjust the directory so that the borg archive is positioned in a folder named 'borg' inside the given directory!"
exit 1
elif ! [ -f "$BORG_BACKUP_DIRECTORY/config" ]; then
echo "A 'borg' directory was found but could not find the borg archive."
echo "Only the files/folders below have been found in the borg directory."
ls -a "$BORG_BACKUP_DIRECTORY"
echo "The archive and most importantly the config file must be positioned directly in the 'borg' subfolder."
exit 1
elif ! borg list "$BORG_BACKUP_DIRECTORY"; then
echo "The entered path seems to be valid but could not open the backup archive."
echo "Most likely the entered password was wrong so please adjust it accordingly!"
exit 1
else
echo "Everything looks fine so feel free to continue!"
exit 0
fi
fi

View File

@@ -1,16 +1,27 @@
#!/bin/bash
# Variables
export MOUNT_DIR="/mnt/borgbackup"
export BORG_BACKUP_DIRECTORY="$MOUNT_DIR/borg"
# Validate BORG_PASSWORD
if [ -z "$BORG_PASSWORD" ]; then
echo "BORG_PASSWORD is not allowed to be empty."
if [ -z "$BORG_PASSWORD" ] && [ -z "$BACKUP_RESTORE_PASSWORD" ]; then
echo "Neither BORG_PASSWORD nor BACKUP_RESTORE_PASSWORD are set."
exit 1
fi
export BORG_PASSWORD
# Export defaults
if [ -n "$BACKUP_RESTORE_PASSWORD" ]; then
export BORG_PASSPHRASE="$BACKUP_RESTORE_PASSWORD"
else
export BORG_PASSPHRASE="$BORG_PASSWORD"
fi
export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes
export BORG_RELOCATED_REPO_ACCESS_IS_OK=yes
# Validate BORG_MODE
if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != restore ] && [ "$BORG_MODE" != check ]; then
echo "No correct BORG_MODE mode applied. Valid are 'backup' and 'restore'."
if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != restore ] && [ "$BORG_MODE" != check ] && [ "$BORG_MODE" != test ]; then
echo "No correct BORG_MODE mode applied. Valid are 'backup', 'check', 'restore' and 'test'."
exit 1
fi
@@ -24,6 +35,14 @@ fi
# Remove lockfile
rm -f "/nextcloud_aio_volumes/nextcloud_aio_database_dump/backup-is-running"
# Get a list of all available borg archives
if borg list "$BORG_BACKUP_DIRECTORY" &>/dev/null; then
borg list "$BORG_BACKUP_DIRECTORY" | grep "nextcloud-aio" | awk -F " " '{print $1","$3,$4}' > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
else
echo "" > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
fi
chmod +r "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
if [ -n "$FAILED" ]; then
if [ "$BORG_MODE" = backup ]; then
# Add file to Nextcloud container so that it skips any update the next time

View File

@@ -0,0 +1,5 @@
# Probably from this file: https://github.com/Cisco-Talos/clamav/blob/main/Dockerfile
FROM clamav/clamav:0.104.2-3
COPY clamav.conf /tmp/
RUN cat /tmp/clamav.conf >> /etc/clamav/clamd.conf

View File

@@ -0,0 +1,4 @@
MaxDirectoryRecursion 30
MaxFileSize 100M
PCREMaxFileSize 100M
StreamMaxLength 100M

View File

@@ -1,2 +1,2 @@
# From a file located probably somewhere here: https://github.com/CollaboraOnline/online/tree/master/docker
FROM collabora/code:latest
FROM collabora/code:21.11.4.2.1

View File

@@ -1,4 +1,4 @@
FROM alpine
FROM alpine:3.15.4
RUN apk add --update --no-cache lighttpd bash
RUN adduser -S www-data -G www-data

View File

@@ -1,6 +1,6 @@
server.document-root = "/var/www/domaincheck/"
server.port = 443
server.port = env.APACHE_PORT
server.username = "www-data"
server.groupname = "www-data"

View File

@@ -7,6 +7,10 @@ fi
echo "$INSTANCE_ID" > /var/www/domaincheck/index.html
if [ -z "$APACHE_PORT" ]; then
export APACHE_PORT="443"
fi
# Check config file
lighttpd -tt -f /etc/lighttpd/lighttpd.conf

View File

@@ -1,5 +1,11 @@
# Docker CLI is a requirement
FROM docker:20.10.15-dind-alpine3.15 as dind
# Caddy is a requirement
FROM caddy:2.5.1-alpine as caddy
# From https://github.com/docker-library/php/blob/master/8.0/bullseye/apache/Dockerfile
FROM php:8.0-apache-bullseye
FROM php:8.0.18-apache-bullseye
EXPOSE 80
EXPOSE 8080
@@ -20,20 +26,19 @@ RUN apt-get update; \
openssl \
sudo \
dpkg-dev \
netcat \
; \
rm -rf /var/lib/apt/lists/*
RUN set -ex; \
curl "https://caddyserver.com/api/download?os=linux&arch=$(dpkg-architecture --query DEB_BUILD_ARCH)" -o "/usr/bin/caddy" \
&& chmod +x /usr/bin/caddy \
&& /usr/bin/caddy version
COPY --from=caddy /usr/bin/caddy /usr/bin/
RUN chmod +x /usr/bin/caddy
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
COPY --from=dind /usr/local/bin/docker /usr/local/bin/
RUN chmod +x /usr/local/bin/docker
RUN mkdir -p /usr/src/php/ext/apcu && \
curl -fsSL https://pecl.php.net/get/apcu | tar xvz -C "/usr/src/php/ext/apcu" --strip 1 && \
docker-php-ext-install apcu
RUN set -ex; \
pecl install APCu-5.1.21; \
docker-php-ext-enable apcu
RUN set -e && \
curl -sS https://getcomposer.org/installer | php && \
@@ -80,10 +85,15 @@ RUN mkdir /var/log/supervisord; \
COPY Caddyfile /
COPY start.sh /usr/bin/
COPY backup-time-file-watcher.sh /
COPY session-deduplicator.sh /
COPY cron.sh /
COPY supervisord.conf /
RUN chmod +x /usr/bin/start.sh; \
chmod +x /cron.sh
chmod +x /cron.sh; \
chmod +x /session-deduplicator.sh; \
chmod +x /backup-time-file-watcher.sh; \
chmod a+r /Caddyfile
USER root

View File

@@ -0,0 +1,30 @@
#!/bin/bash
restart_process() {
echo "Restarting cron.sh because daily backup time was set, changed or unset."
pkill cron.sh
}
file_present() {
if [ -f "/mnt/docker-aio-config/data/daily_backup_time" ]; then
if [ "$FILE_PRESENT" = 0 ]; then
restart_process
else
if [ -n "$BACKUP_TIME" ] && [ "$(cat "/mnt/docker-aio-config/data/daily_backup_time")" != "$BACKUP_TIME" ]; then
restart_process
fi
fi
FILE_PRESENT=1
BACKUP_TIME="$(cat "/mnt/docker-aio-config/data/daily_backup_time")"
else
if [ "$FILE_PRESENT" = 1 ]; then
restart_process
fi
FILE_PRESENT=0
fi
}
while true; do
file_present
sleep 2
done

View File

@@ -1,10 +1,96 @@
#!/bin/sh
set -eux
#!/bin/bash
while true; do
if [ -f "/mnt/docker-aio-config/data/daily_backup_time" ]; then
set -x
BACKUP_TIME="$(cat "/mnt/docker-aio-config/data/daily_backup_time")"
DAILY_BACKUP=1
set +x
else
BACKUP_TIME="04:00"
DAILY_BACKUP=0
fi
if [ -f "/mnt/docker-aio-config/data/daily_backup_running" ]; then
LOCK_FILE_PRESENT=1
else
LOCK_FILE_PRESENT=0
fi
# Allow to continue directly if e.g. the mastercontainer was updated. Otherwise wait for the next execution
if [ "$LOCK_FILE_PRESENT" = 0 ]; then
while [ "$(date +%H:%M)" != "$BACKUP_TIME" ]; do
sleep 1
done
fi
if [ "$DAILY_BACKUP" = 1 ]; then
echo "Daily backup has started"
# Delete all active sessions and create a lock file
# But don't kick out the user if the mastercontainer was just updated since we block the interface either way with the lock file
if [ "$LOCK_FILE_PRESENT" = 0 ]; then
rm -f "/mnt/docker-aio-config/session/"*
fi
sudo -u www-data touch "/mnt/docker-aio-config/data/daily_backup_running"
# Check if apache is running/stopped, watchtower is stopped and backupcontainer is stopped
APACHE_PORT="$(docker inspect nextcloud-aio-apache --format "{{.HostConfig.PortBindings}}" | grep -oP '[0-9]+' | head -1)"
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-apache$" && ! nc -z nextcloud-aio-apache "$APACHE_PORT"; do
echo "Waiting for apache to become available"
sleep 30
done
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$"; do
echo "Waiting for watchtower to stop"
sleep 30
done
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-borgbackup$"; do
echo "Waiting for borgbackup to stop"
sleep 30
done
# Update the mastercontainer
sudo -u www-data php /var/www/docker-aio/php/src/Cron/UpdateMastercontainer.php
# Wait for watchtower to stop
if ! docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$"; then
echo "Something seems to be wrong: Watchtower should be started at this step."
else
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$"; do
echo "Waiting for watchtower to stop"
sleep 30
done
fi
# Execute the backup itself and some related tasks
sudo -u www-data php /var/www/docker-aio/php/src/Cron/DailyBackup.php
# Delete the lock file
rm -f "/mnt/docker-aio-config/data/daily_backup_running"
# Wait for the nextcloud container to start and send if the backup was successful
if ! docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-nextcloud$"; then
echo "Something seems to be wrong: Nextcloud should be started at this step."
else
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-nextcloud$" && ! nc -z nextcloud-aio-nextcloud 9000; do
echo "Waiting for the Nextcloud container to start"
sleep 30
done
fi
sudo -u www-data php /var/www/docker-aio/php/src/Cron/BackupNotification.php
echo "Daily backup has finished"
fi
# Make sure to delete the lock file always
rm -f "/mnt/docker-aio-config/data/daily_backup_running"
# Check for updates and send notification if yes
sudo -u www-data php /var/www/docker-aio/php/src/Cron/cron.php
sudo -u www-data php /var/www/docker-aio/php/src/Cron/UpdateNotification.php
# Remove sessions older than 24h
find "/mnt/docker-aio-config/session/" -mindepth 1 -mmin +1440 -delete
# Remove dangling images
sudo -u www-data docker image prune -f
sleep 1d
done

View File

@@ -0,0 +1,23 @@
#!/bin/bash
while true; do
while [ "$(find "/mnt/docker-aio-config/session/" -mindepth 1 -exec grep "aio_authenticated|[a-z]:1" {} \; | wc -l)" -gt 1 ]; do
unset SESSION_FILES
SESSION_FILES="$(find "/mnt/docker-aio-config/session/" -mindepth 1)"
unset SESSION_FILES_ARRAY
mapfile -t SESSION_FILES_ARRAY <<< "$SESSION_FILES"
for SESSION_FILE in "${SESSION_FILES_ARRAY[@]}"; do
if ! grep -q "aio_authenticated|[a-z]:1" "$SESSION_FILE"; then
rm "$SESSION_FILE"
fi
done
echo "Deleting duplicate sessions"
unset OLDEST_FILE
set -x
# shellcheck disable=SC2012
OLDEST_FILE="$(ls -t "/mnt/docker-aio-config/session/" | tail -1)"
rm "/mnt/docker-aio-config/session/$OLDEST_FILE"
set +x
done
sleep 5
done

View File

@@ -6,6 +6,14 @@ print_green() {
printf "%b%s%b\n" "\e[0;92m" "$TEXT" "\e[0m"
}
# Function to check if number was provided
check_if_number() {
case "${1}" in
''|*[!0-9]*) return 1 ;;
*) return 0 ;;
esac
}
# Check if socket is available and readable
if ! [ -a "/var/run/docker.sock" ]; then
echo "Docker socket is not available. Cannot continue."
@@ -23,6 +31,9 @@ elif ! sudo -u www-data test -r /var/run/docker.sock; then
echo "Adding internal www-data to group $DOCKER_GROUP"
usermod -aG "$DOCKER_GROUP" www-data
else
# Delete the docker group for cases when the docker socket permissions changed between restarts
groupdel docker &>/dev/null
# If the group doesn't exist, create it
echo "Creating docker group internally with id $DOCKER_GROUP_ID"
groupadd -g "$DOCKER_GROUP_ID" docker
@@ -35,7 +46,7 @@ elif ! sudo -u www-data test -r /var/run/docker.sock; then
fi
# Check if api version is supported
if ! docker info &>/dev/null; then
if ! sudo -u www-data docker info &>/dev/null; then
echo "Cannot connect to the docker socket. Cannot proceed."
exit 1
fi
@@ -43,10 +54,10 @@ API_VERSION_FILE="$(find ./ -name DockerActionManager.php | head -1)"
API_VERSION="$(grep -oP 'const API_VERSION.*\;' "$API_VERSION_FILE" | grep -oP '[0-9]+.[0-9]+' | head -1)"
# shellcheck disable=SC2001
API_VERSION_NUMB="$(echo "$API_VERSION" | sed 's/\.//')"
LOCAL_API_VERSION_NUMB="$(docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')"
LOCAL_API_VERSION_NUMB="$(sudo -u www-data docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')"
if [ -n "$LOCAL_API_VERSION_NUMB" ] && [ -n "$API_VERSION_NUMB" ]; then
if ! [ "$LOCAL_API_VERSION_NUMB" -ge "$API_VERSION_NUMB" ]; then
echo "Docker v$API_VERSION is not supported by your docker engine. Cannot proceed."
echo "Docker API v$API_VERSION is not supported by your docker engine. Cannot proceed. Please upgrade your docker engine if you want to run Nextcloud AIO!"
exit 1
fi
else
@@ -54,6 +65,64 @@ else
sleep 10
fi
# Check if startup command was executed correctly
if ! sudo -u www-data docker ps | grep -q "nextcloud-aio-mastercontainer"; then
echo "It seems like you did not give the mastercontainer the correct name?
Using a different name is not supported!"
exit 1
elif ! sudo -u www-data docker volume ls | grep -q "nextcloud_aio_mastercontainer"; then
echo "It seems like you did not give the mastercontainer volume the correct name?
Using a different name is not supported!"
exit 1
fi
# Check for other options
if [ -n "$NEXTCLOUD_DATADIR" ]; then
if ! echo "$NEXTCLOUD_DATADIR" | grep -q "^/" || [ "$NEXTCLOUD_DATADIR" = "/" ]; then
echo "You've set NEXTCLOUD_DATADIR but not to an allowed value.
The string must start with '/' and must not be equal to '/'.
It is set to '$NEXTCLOUD_DATADIR'."
exit 1
fi
fi
if [ -n "$NEXTCLOUD_MOUNT" ]; then
if ! echo "$NEXTCLOUD_MOUNT" | grep -q "^/" || [ "$NEXTCLOUD_MOUNT" = "/" ]; then
echo "You've set NEXCLOUD_MOUNT but not to an allowed value.
The string must start with '/' and must not be equal to '/'.
It is set to '$NEXTCLOUD_MOUNT'."
exit 1
elif [ "$NEXTCLOUD_MOUNT" = "/mnt/ncdata" ] || echo "$NEXTCLOUD_MOUNT" | grep -q "^/mnt/ncdata/"; then
echo "'/mnt/ncdata' and '/mnt/ncdata/' are not allowed as values for NEXTCLOUD_MOUNT."
exit 1
fi
fi
if [ -n "$NEXTCLOUD_DATADIR" ] && [ -n "$NEXTCLOUD_MOUNT" ]; then
if [ "$NEXTCLOUD_DATADIR" = "$NEXTCLOUD_MOUNT" ]; then
echo "NEXTCLOUD_DATADIR and NEXTCLOUD_MOUNT are not allowed to be equal."
exit 1
fi
fi
if [ -n "$APACHE_PORT" ]; then
if ! check_if_number "$APACHE_PORT"; then
echo "You provided an Apache port but did not only use numbers.
It is set to '$APACHE_PORT'."
exit 1
elif ! [ "$APACHE_PORT" -le 65535 ] || ! [ "$APACHE_PORT" -ge 1 ]; then
echo "The provided Apache port is invalid. It must be between 1 and 65535"
exit 1
fi
fi
# Check DNS resolution
# Prevents issues like https://github.com/nextcloud/all-in-one/discussions/565
curl https://nextcloud.com &>/dev/null
if [ "$?" = 6 ]; then
echo "Could not resolve the host nextcloud.com."
echo "Most likely the DNS resolving does not work."
echo "You should be able to fix this by adding the '--dns=\"ip.address.of.dns.server\"' option to the docker run command."
exit 1
fi
# Add important folders
mkdir -p /mnt/docker-aio-config/data/
mkdir -p /mnt/docker-aio-config/session/
@@ -65,9 +134,28 @@ chmod 770 -R /mnt/docker-aio-config
chmod 777 /mnt/docker-aio-config
chown www-data:www-data -R /mnt/docker-aio-config/data/
chown www-data:www-data -R /mnt/docker-aio-config/session/
chown root:root -R /mnt/docker-aio-config/caddy/
chown www-data:www-data -R /mnt/docker-aio-config/caddy/
chown root:root -R /mnt/docker-aio-config/certs/
# Don't allow access to the AIO interface from the Nextcloud container
# Probably more cosmetic than anything but at least an attempt
if ! grep -q '# nextcloud-aio-block' /etc/apache2/apache2.conf; then
if ! NETWORK_GATEWAY="$(docker inspect nextcloud-aio-mastercontainer --format "{{.NetworkSettings.Gateway}}")" || [ -z "$NETWORK_GATEWAY" ]; then
echo "Could not get the gateway of the mastercontainer. Cannot continue."
exit 1
fi
cat << APACHE_CONF >> /etc/apache2/apache2.conf
# nextcloud-aio-block-start
<Location />
order allow,deny
deny from nextcloud-aio-nextcloud.nextcloud-aio
deny from $NETWORK_GATEWAY
allow from all
</Location>
# nextcloud-aio-block-end
APACHE_CONF
fi
# Adjust certs
GENERATED_CERTS="/mnt/docker-aio-config/certs"
TMP_CERTS="/etc/apache2/certs"

View File

@@ -20,7 +20,7 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=/usr/bin/caddy run -config /Caddyfile
command=sudo -u www-data /usr/bin/caddy run -config /Caddyfile
[program:cron]
stdout_logfile=/dev/stdout
@@ -28,3 +28,17 @@ stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=/cron.sh
[program:backup-time-file-watcher]
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=/backup-time-file-watcher.sh
[program:session-deduplicator]
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=/session-deduplicator.sh

View File

@@ -1,5 +1,5 @@
# From https://github.com/nextcloud/docker/blob/master/23/fpm-alpine/Dockerfile
FROM php:8.0-fpm-alpine
FROM php:8.0.18-fpm-alpine3.15
# Custom: change id of www-data user as it needs to be the same like on old installations
RUN set -ex; \
@@ -61,8 +61,8 @@ RUN set -ex; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.21; \
pecl install memcached-3.1.5; \
pecl install redis-5.3.6; \
pecl install memcached-3.2.0; \
pecl install redis-5.3.7; \
pecl install imagick-3.7.0; \
\
docker-php-ext-enable \
@@ -105,7 +105,7 @@ RUN { \
VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 23.0.1
ENV NEXTCLOUD_VERSION 23.0.4
RUN set -ex; \
apk add --no-cache --virtual .fetch-deps \
@@ -233,7 +233,8 @@ RUN set -ex; \
chmod +x /entrypoint.sh && \
chmod +r /upgrade.exclude && \
chmod +x /cron.sh && \
chmod +x /notify.sh
chmod +x /notify.sh && \
chmod +x /activate-collabora.sh
RUN set -ex; \
mkdir /mnt/ncdata; \

View File

@@ -0,0 +1,20 @@
#!/bin/bash
COLLABORA_ACTIVATED=0
while true; do
if [ "$COLLABORA_ENABLED" != yes ]; then
# Basically sleep for forever if collabora is not enabled
sleep 365d
fi
if [ "$COLLABORA_ACTIVATED" != 0 ]; then
# Basically sleep for forever if collabora was activated
sleep 365d
fi
while ! nc -z "$NC_DOMAIN" 443; do
sleep 5
done
echo "Activating collabora config"
php /var/www/html/occ richdocuments:activate-config
COLLABORA_ACTIVATED=1
done

View File

@@ -18,8 +18,3 @@ $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,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -eu
while true; do

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# version_greater A B returns whether A > B
version_greater() {
@@ -21,6 +21,15 @@ redis.session.lock_retries = -1
redis.session.lock_wait_time = 10000
REDIS_CONF
# Check permissions in ncdata
touch "/mnt/ncdata/this-is-a-test-file"
if ! [ -f "/mnt/ncdata/this-is-a-test-file" ]; then
echo "The www-data user doesn't seem to have access rights in /mnt/ncdata.
Did you maybe change the datadir and did forget to apply the correct permissions?"
exit 1
fi
rm "/mnt/ncdata/this-is-a-test-file"
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);')"
@@ -39,6 +48,14 @@ if [ "$installed_version" != "0.0.0.0" ]; then
unset ADMIN_PASSWORD
fi
# Don't start the container if Nextcloud is not compatible with the PHP version
if [ -f "/var/www/html/lib/versioncheck.php" ] && ! php /var/www/html/lib/versioncheck.php; then
echo "It seems like your installed Nextcloud is not compatible with the by the container provided PHP version."
echo "This most likely happened because you tried to restore an old Nextcloud version from backup that is not compatible with the PHP version that comes with the container."
echo "Please try to restore a more recent backup which contains a Nextcloud version that is compatible with the PHP version that comes with the container."
exit 1
fi
# Skip any update if Nextcloud was just restored
if ! [ -f "/mnt/ncdata/skip.update" ]; then
if version_greater "$image_version" "$installed_version"; then
@@ -64,6 +81,8 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then
mkdir -p /usr/src/tmp/nextcloud/custom_apps
chmod +x /usr/src/tmp/nextcloud/occ
cp /usr/src/nextcloud/config/* /usr/src/tmp/nextcloud/config/
mkdir -p /usr/src/tmp/nextcloud/apps/nextcloud-aio
cp /usr/src/nextcloud/apps/nextcloud-aio/* /usr/src/tmp/nextcloud/apps/nextcloud-aio/
mv /usr/src/nextcloud /usr/src/temp-nextcloud
mv /usr/src/tmp/nextcloud /usr/src/nextcloud
rm -r /usr/src/tmp
@@ -202,9 +221,12 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then
echo "Upgrading nextcloud from $installed_version to $image_version..."
if ! php /var/www/html/occ upgrade || ! php /var/www/html/occ -V; then
echo "Upgrade failed. Please restore from backup."
bash /notify.sh "Nextcloud update to $image_version failed!" "Please restore from backup!"
exit 1
fi
bash /notify.sh "Nextcloud update to $image_version successful!" "Feel free to inspect the Nextcloud container logs for more info."
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
@@ -221,6 +243,27 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then
php /var/www/html/occ maintenance:mimetype:update-db
fi
fi
# Performing update of all apps if daily backups are enabled, running and successful
if [ "$DAILY_BACKUP_RUNNING" = 'yes' ]; then
UPDATED_APPS="$(php /var/www/html/occ app:update --all)"
if [ -n "$UPDATED_APPS" ]; then
bash /notify.sh "Your apps just got updated!" "$UPDATED_APPS"
fi
fi
fi
# Check if appdata is present
# If not, something broke (e.g. changing ncdatadir after aio was first started)
if [ -z "$(find "/mnt/ncdata/" -maxdepth 1 -mindepth 1 -type d -name "appdata_*")" ]; then
echo "Appdata is not present. Did you maybe change the datadir after aio was first started?"
exit 1
fi
# Perform fingerprint update if instance was restored
if [ -f "/mnt/ncdata/fingerprint.update" ]; then
php /var/www/html/occ maintenance:data-fingerprint
rm "/mnt/ncdata/fingerprint.update"
fi
# Apply one-click-instance settings
@@ -235,6 +278,13 @@ php /var/www/html/occ config:system:set overwrite.cli.url --value="https://$NC_D
php /var/www/html/occ config:system:set htaccess.RewriteBase --value="/"
php /var/www/html/occ maintenance:update:htaccess
# Disallow creating local external storages when nothing was mounted
if [ -z "$NEXTCLOUD_MOUNT" ]; then
php /var/www/html/occ config:system:set files_external_allow_create_new_local --type=bool --value=false
else
php /var/www/html/occ config:system:set files_external_allow_create_new_local --type=bool --value=true
fi
# AIO app
if [ "$(php /var/www/html/occ config:app:get nextcloud-aio enabled)" = "" ]; then
php /var/www/html/occ app:enable nextcloud-aio
@@ -250,35 +300,93 @@ elif [ "$(php /var/www/html/occ config:app:get notify_push enabled)" = "no" ]; t
else
php /var/www/html/occ app:update notify_push
fi
php /var/www/html/occ config:system:set trusted_proxies 0 --value="127.0.0.1"
php /var/www/html/occ config:app:set notify_push base_endpoint --value="https://$NC_DOMAIN/push"
# Collabora
if ! [ -d "/var/www/html/custom_apps/richdocuments" ]; then
php /var/www/html/occ app:install richdocuments
elif [ "$(php /var/www/html/occ config:app:get richdocuments enabled)" = "no" ]; then
php /var/www/html/occ app:enable richdocuments
if [ "$COLLABORA_ENABLED" = 'yes' ]; then
if ! [ -d "/var/www/html/custom_apps/richdocuments" ]; then
php /var/www/html/occ app:install richdocuments
elif [ "$(php /var/www/html/occ config:app:get richdocuments enabled)" = "no" ]; then
php /var/www/html/occ app:enable richdocuments
else
php /var/www/html/occ app:update richdocuments
fi
php /var/www/html/occ config:app:set richdocuments wopi_url --value="https://$NC_DOMAIN/"
# Fix https://github.com/nextcloud/all-in-one/issues/188:
php /var/www/html/occ config:system:set allow_local_remote_servers --type=bool --value=true
else
php /var/www/html/occ app:update richdocuments
if [ -d "/var/www/html/custom_apps/richdocuments" ]; then
php /var/www/html/occ config:system:delete allow_local_remote_servers
php /var/www/html/occ app:remove richdocuments
fi
fi
# OnlyOffice
if [ "$ONLYOFFICE_ENABLED" = 'yes' ]; then
while ! nc -z "$ONLYOFFICE_HOST" 80; do
echo "waiting for OnlyOffice to become available..."
sleep 5
done
if ! [ -d "/var/www/html/custom_apps/onlyoffice" ]; then
php /var/www/html/occ app:install onlyoffice
elif [ "$(php /var/www/html/occ config:app:get onlyoffice enabled)" = "no" ]; then
php /var/www/html/occ app:enable onlyoffice
else
php /var/www/html/occ app:update onlyoffice
fi
php /var/www/html/occ config:app:set onlyoffice DocumentServerUrl --value="https://$NC_DOMAIN/onlyoffice"
else
if [ -d "/var/www/html/custom_apps/onlyoffice" ]; then
php /var/www/html/occ app:remove onlyoffice
fi
fi
php /var/www/html/occ config:app:set richdocuments wopi_url --value="https://$NC_DOMAIN/"
# php /var/www/html/occ richdocuments:activate-config
# Fix https://github.com/nextcloud/all-in-one/issues/188:
php /var/www/html/occ config:system:set allow_local_remote_servers --type=bool --value=true
# Talk
if ! [ -d "/var/www/html/custom_apps/spreed" ]; then
php /var/www/html/occ app:install spreed
elif [ "$(php /var/www/html/occ config:app:get spreed enabled)" = "no" ]; then
php /var/www/html/occ app:enable spreed
if [ "$TALK_ENABLED" = 'yes' ]; then
if ! [ -d "/var/www/html/custom_apps/spreed" ]; then
php /var/www/html/occ app:install spreed
elif [ "$(php /var/www/html/occ config:app:get spreed enabled)" = "no" ]; then
php /var/www/html/occ app:enable spreed
else
php /var/www/html/occ app:update spreed
fi
STUN_SERVERS="[\"$NC_DOMAIN:3478\"]"
TURN_SERVERS="[{\"server\":\"$NC_DOMAIN:3478\",\"secret\":\"$TURN_SECRET\",\"protocols\":\"udp,tcp\"}]"
SIGNALING_SERVERS="{\"servers\":[{\"server\":\"https://$NC_DOMAIN/standalone-signaling/\",\"verify\":true}],\"secret\":\"$SIGNALING_SECRET\"}"
php /var/www/html/occ config:app:set spreed stun_servers --value="$STUN_SERVERS" --output json
php /var/www/html/occ config:app:set spreed turn_servers --value="$TURN_SERVERS" --output json
php /var/www/html/occ config:app:set spreed signaling_servers --value="$SIGNALING_SERVERS" --output json
else
php /var/www/html/occ app:update spreed
if [ -d "/var/www/html/custom_apps/spreed" ]; then
php /var/www/html/occ app:remove spreed
fi
fi
# Clamav
if [ "$CLAMAV_ENABLED" = 'yes' ]; then
while ! nc -z "$CLAMAV_HOST" 3310; do
echo "waiting for clamav to become available..."
sleep 5
done
if ! [ -d "/var/www/html/custom_apps/files_antivirus" ]; then
php /var/www/html/occ app:install files_antivirus
elif [ "$(php /var/www/html/occ config:app:get files_antivirus enabled)" = "no" ]; then
php /var/www/html/occ app:enable files_antivirus
else
php /var/www/html/occ app:update files_antivirus
fi
php /var/www/html/occ config:app:set files_antivirus av_mode --value="daemon"
php /var/www/html/occ config:app:set files_antivirus av_port --value="3310"
php /var/www/html/occ config:app:set files_antivirus av_host --value="$CLAMAV_HOST"
php /var/www/html/occ config:app:set files_antivirus av_stream_max_length --value="104857600"
php /var/www/html/occ config:app:set files_antivirus av_max_file_size --value="-1"
php /var/www/html/occ config:app:set files_antivirus av_infected_action --value="only_log"
else
if [ -d "/var/www/html/custom_apps/files_antivirus" ]; then
php /var/www/html/occ app:remove files_antivirus
fi
fi
STUN_SERVERS="[\"$NC_DOMAIN:3478\"]"
TURN_SERVERS="[{\"server\":\"$NC_DOMAIN:3478\",\"secret\":\"$TURN_SECRET\",\"protocols\":\"udp,tcp\"}]"
SIGNALING_SERVERS="{\"servers\":[{\"server\":\"https://$NC_DOMAIN/standalone-signaling/\",\"verify\":true}],\"secret\":\"$SIGNALING_SECRET\"}"
php /var/www/html/occ config:app:set spreed stun_servers --value="$STUN_SERVERS" --output json
php /var/www/html/occ config:app:set spreed turn_servers --value="$TURN_SERVERS" --output json
php /var/www/html/occ config:app:set spreed signaling_servers --value="$SIGNALING_SERVERS" --output json
# Remove the update skip file always
rm -f /mnt/ncdata/skip.update

View File

@@ -6,6 +6,16 @@ while ! nc -z "$POSTGRES_HOST" 5432; do
sleep 5
done
# Use the correct Postgres username
POSTGRES_USER="oc_$POSTGRES_USER"
export POSTGRES_USER
# Fix false database connection on old instances
if [ -f "/var/www/html/config/config.php" ] && sleep 2 && psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB" -c "select now()"; then
sed -i "s|'dbuser'.*=>.*$|'dbuser' => '$POSTGRES_USER',|" /var/www/html/config/config.php
sed -i "s|'dbpassword'.*=>.*$|'dbpassword' => '$POSTGRES_PASSWORD',|" /var/www/html/config/config.php
fi
# Run original entrypoint
if ! bash /entrypoint.sh; then
exit 1

View File

@@ -28,3 +28,10 @@ stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=/var/www/html/custom_apps/notify_push/bin/%(ENV_CPU_ARCH)s/notify_push /var/www/html/config/config.php --port 7867 --redis-url redis://:%(ENV_REDIS_HOST_PASSWORD)s@%(ENV_REDIS_HOST)s
[program:activate-collabora]
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=/activate-collabora.sh

View File

@@ -0,0 +1,2 @@
# From https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/Dockerfile
FROM onlyoffice/documentserver:7.0.1.37

View File

@@ -1,7 +1,7 @@
# From https://github.com/docker-library/postgres/blob/master/13/alpine/Dockerfile
FROM postgres:13-alpine
FROM postgres:14.2-alpine3.15
RUN apk add --update --no-cache bash openssl shadow
RUN apk add --update --no-cache bash openssl shadow netcat-openbsd
# We need to use the same gid and uid as on old installations
RUN set -ex; \
@@ -17,7 +17,9 @@ RUN set -ex; \
chown -R postgres:postgres "$PGDATA"
COPY start.sh /usr/bin/
RUN chmod +x /usr/bin/start.sh
COPY init-user-db.sh /docker-entrypoint-initdb.d/
RUN chmod +x /usr/bin/start.sh; \
chmod +xr /docker-entrypoint-initdb.d/init-user-db.sh
RUN mkdir /mnt/data; \
chown postgres:postgres /mnt/data;

View File

@@ -0,0 +1,9 @@
#!/bin/bash
set -ex
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
ALTER DATABASE "$POSTGRES_DB" OWNER TO "oc_$POSTGRES_USER";
EOSQL
set +ex

View File

@@ -18,10 +18,18 @@ if ! [ -w "$DUMP_DIR" ]; then
exit 1
fi
# Delete the datadir once (needed for setting the correct credentials on old instances once)
if ! [ -f "$DUMP_DIR/export.failed" ] && ! [ -f "$DUMP_DIR/initial-cleanup-done" ]; then
set -ex
rm -rf "${DATADIR:?}/"*
touch "$DUMP_DIR/initial-cleanup-done"
set +ex
fi
# Test if some things match
# shellcheck disable=SC2235
if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSION")" ] ) \
|| ( ! [ -f "$DATADIR/PG_VERSION" ] && [ -f "$DUMP_FILE" ] ); then
|| ( ! [ -f "$DATADIR/PG_VERSION" ] && ( [ -f "$DUMP_FILE" ] || [ -f "$DUMP_DIR/export.failed" ] ) ); then
# The DUMP_file must be provided
if ! [ -f "$DUMP_FILE" ]; then
echo "Unable to restore the database because the database dump is missing."
@@ -39,7 +47,7 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
echo "Restoring from database dump."
# Exit if any command fails
set -e
set -ex
# Remove old database files
rm -rf "${DATADIR:?}/"*
@@ -50,13 +58,33 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
# Create new database
exec docker-entrypoint.sh postgres &
# Wait 2s for creation
sleep 2s
# Wait for creation
while ! nc -z localhost 11000; do
echo "Waiting for the database to start."
sleep 5
done
# Set correct permissions
if grep -q "Owner: oc_admin" "$DUMP_FILE" && ! grep -q "Owner: oc_$POSTGRES_USER" "$DUMP_FILE"; then
OC_ADMIN_EXISTS=1
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER oc_admin WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
ALTER DATABASE "$POSTGRES_DB" OWNER TO oc_admin;
EOSQL
fi
# Restore database
echo "Restoring the database from database dump"
psql "$POSTGRES_DB" -U "$POSTGRES_USER" < "$DUMP_FILE"
# Correct permissions
if [ -n "$OC_ADMIN_EXISTS" ]; then
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
ALTER DATABASE "$POSTGRES_DB" OWNER TO "oc_$POSTGRES_USER";
REASSIGN OWNED BY oc_admin TO "oc_$POSTGRES_USER";
EOSQL
fi
# Shut down the database to be able to start it again
pg_ctl stop -m fast
@@ -64,7 +92,7 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
export PGPORT=5432
# Don't exit if command fails anymore
set +e
set +ex
fi
# Cover the last case

View File

@@ -1,5 +1,5 @@
# From https://github.com/docker-library/redis/blob/master/6.2/alpine/Dockerfile
FROM redis:6.2-alpine
FROM redis:6.2.6-alpine3.15
RUN apk add --update --no-cache openssl bash

View File

@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:focal-20220426
EXPOSE 3478
@@ -49,12 +49,16 @@ RUN chmod +x /usr/bin/start.sh; \
sed -i '/TURNSERVER_ENABLED/c\TURNSERVER_ENABLED=1' /etc/default/coturn; \
mkdir -p /var/tmp;
RUN curl -sL -o "/usr/share/janus/lua/json.lua" "https://raw.githubusercontent.com/rxi/json.lua/master/json.lua"; \
curl -sL -o "/usr/share/janus/lua/ansicolors.lua" "https://raw.githubusercontent.com/kikito/ansicolors.lua/master/ansicolors.lua"
RUN mkdir -p /etc/nats; \
echo "listen: 127.0.0.1:4222" > /etc/nats/nats.conf; \
chown talk:talk /etc; \
chown talk:talk -R /etc/nats; \
chown talk:talk -R /etc/janus; \
chown talk:talk -R /etc/signaling; \
chown talk:talk -R /usr/share/janus
chown talk:talk -R /usr
# Give root a random password
RUN echo "root:$(openssl rand -base64 12)" | chpasswd

View File

@@ -19,6 +19,7 @@ fi
cat << TURN_CONF > "/etc/turnserver.conf"
listening-port=3478
fingerprint
lt-cred-mech
use-auth-secret
static-auth-secret=$TURN_SECRET
realm=$NC_DOMAIN
@@ -31,33 +32,51 @@ pidfile=/var/tmp/turnserver.pid
TURN_CONF
# Janus
sed -i "s|#turn_rest_api_key.*|turn_rest_api_key = $JANUS_API_KEY|" /etc/janus/janus.jcfg
sed -i "s|#full_trickle|full_trickle|g" /etc/janus/janus.jcfg
set -x
sed -i "s|#turn_rest_api_key.*|turn_rest_api_key = \"$JANUS_API_KEY\"|" /etc/janus/janus.jcfg
sed -i "s|#full_trickle.*|full_trickle = true|g" /etc/janus/janus.jcfg
sed -i 's|#stun_server.*|stun_server = "127.0.0.1"|g' /etc/janus/janus.jcfg
sed -i "s|#stun_port.*|stun_port = 3478|g" /etc/janus/janus.jcfg
sed -i "s|#turn_port.*|turn_port = 3478|g" /etc/janus/janus.jcfg
sed -i 's|#turn_server.*|turn_server = "127.0.0.1"|g'/etc/janus/janus.jcfg
sed -i 's|#turn_type .*|turn_type = "udp"|g' /etc/janus/janus.jcfg
sed -i 's|#ice_ignore_list .*|ice_ignore_list = "udp"|g' /etc/janus/janus.jcfg
sed -i 's|#interface.*|interface = "lo"|g' /etc/janus/janus.transport.websockets.jcfg
sed -i 's|#ws_interface.*|ws_interface = "lo"|g' /etc/janus/janus.transport.websockets.jcfg
set +x
# Signling
cat << SIGNALING_CONF > "/etc/signaling/server.conf"
[http]
listen = 0.0.0.0:8081
[app]
debug = false
[sessions]
hashkey = $(openssl rand -hex 16)
blockkey = $(openssl rand -hex 16)
[clients]
internalsecret = $(openssl rand -hex 16)
[backend]
allowed = ${NC_DOMAIN}
backends = backend-1
allowall = false
secret = ${SIGNALING_SECRET}
timeout = 10
connectionsperhost = 8
[backend-1]
url = https://${NC_DOMAIN}
secret = ${SIGNALING_SECRET}
[nats]
url = nats://127.0.0.1:4222
[mcu]
type = janus
url = ws://127.0.0.1:8188
[turn]
apikey = ${JANUS_API_KEY}
secret = ${TURN_SECRET}

View File

@@ -27,7 +27,7 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=janus
command=/usr/bin/janus --config=/etc/janus/janus.jcfg --disable-colors --daemon --log-stdout
[program:signaling]
stdout_logfile=/dev/stdout

View File

@@ -1,7 +1,7 @@
# From https://github.com/containrrr/watchtower/blob/main/dockerfiles/Dockerfile.self-contained
FROM containrrr/watchtower:latest as watchtower
FROM containrrr/watchtower:1.4.0 as watchtower
FROM alpine:latest
FROM alpine:3.15.4
RUN apk add --update --no-cache bash
COPY --from=watchtower /watchtower /

View File

@@ -14,11 +14,22 @@ nextcloud/all-in-one:develop
And you are done :)
It will now also select the developer channel for all other containers automatically.
## How to publish new releases?
Simply use https://github.com/nextcloud/all-in-one/issues/180 as template.
## How to build new containers
Go to https://github.com/nextcloud-releases/all-in-one/actions/workflows/repo-sync.yml and run the workflow that will first sync the repo and then build new container that automatically get published to `develop` and `develop-arm64`.
## How to promote builds from develop to latest
## How to promote builds from develop to beta
1. Verify that no job is running here: https://github.com/nextcloud-releases/all-in-one/actions/workflows/build_images.yml
2. Go to https://github.com/nextcloud-releases/all-in-one/actions/workflows/promote-to-latest.yml, click on `Run workflow` and enter your desired container image name that you want to publish from develop to latest. Available image names are listed here: https://github.com/nextcloud-releases/all-in-one/blob/main/.github/workflows/build_images.yml#L21-L30
2. Go to https://github.com/nextcloud-releases/all-in-one/actions/workflows/promote-to-beta.yml, click on `Run workflow`.
## How to promote builds from beta to latest
1. Verify that no job is running here: https://github.com/nextcloud-releases/all-in-one/actions/workflows/promote-to-beta.yml
2. Go to https://github.com/nextcloud-releases/all-in-one/actions/workflows/promote-to-latest.yml, click on `Run workflow`.
## Where to find the VPS builds?
This is documented here: https://github.com/nextcloud-releases/all-in-one/tree/main/.build

View File

@@ -6,13 +6,31 @@ volumes:
services:
nextcloud:
image: nextcloud/all-in-one:latest
restart: unless-stopped
image: nextcloud/all-in-one:latest # Must be changed to 'nextcloud/all-in-one:latest-arm64' when used with an arm64 CPU
restart: always
container_name: nextcloud-aio-mastercontainer
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 80:80
- 80:80 # Can be removed when running behind a reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
- 8080:8080
- 8443:8443
- 8443:8443 # Can be removed when running behind a reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# environment: # Is needed when using any of the options below
# - APACHE_PORT=11000 # Is needed when running behind a reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# - NEXTCLOUD_DATADIR="/mnt/ncdata" # Allows to set the host directory for Nextcloud's datadir. See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir
# - NEXTCLOUD_MOUNT="/mnt/" # Allows the Nextcloud container to access the chosen directory on the host. See https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host
# # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588
# caddy:
# image: caddy:alpine
# restart: always
# container_name: caddy
# volumes:
# - ./Caddyfile:/etc/caddy/Caddyfile
# - ./certs:/certs
# - ./config:/config
# - ./data:/data
# - ./sites:/srv
# network_mode: "host"

View File

@@ -17,5 +17,9 @@
"slim/twig-view": "^3.2",
"slim/csrf": "^1.2",
"ext-apcu": "*"
}
},
"scripts": {
"psalm": "psalm --threads=1",
"psalm:update-baseline": "psalm --threads=1 --update-baseline"
}
}

272
php/composer.lock generated
View File

@@ -8,16 +8,16 @@
"packages": [
{
"name": "guzzlehttp/guzzle",
"version": "7.4.1",
"version": "7.4.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79"
"reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79",
"reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4",
"reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4",
"shasum": ""
},
"require": {
@@ -50,12 +50,12 @@
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\": "src/"
},
"files": [
"src/functions_include.php"
]
],
"psr-4": {
"GuzzleHttp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -112,7 +112,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.4.1"
"source": "https://github.com/guzzle/guzzle/tree/7.4.2"
},
"funding": [
{
@@ -128,7 +128,7 @@
"type": "tidelift"
}
],
"time": "2021-12-06T18:43:05+00:00"
"time": "2022-03-20T14:16:28+00:00"
},
{
"name": "guzzlehttp/promises",
@@ -157,12 +157,12 @@
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
},
"files": [
"src/functions_include.php"
]
],
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -216,16 +216,16 @@
},
{
"name": "guzzlehttp/psr7",
"version": "2.1.0",
"version": "2.2.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72"
"reference": "c94a94f120803a18554c1805ef2e539f8285f9a2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72",
"reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2",
"reference": "c94a94f120803a18554c1805ef2e539f8285f9a2",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.1-dev"
"dev-master": "2.2-dev"
}
},
"autoload": {
@@ -311,7 +311,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.1.0"
"source": "https://github.com/guzzle/psr7/tree/2.2.1"
},
"funding": [
{
@@ -327,7 +327,7 @@
"type": "tidelift"
}
],
"time": "2021-10-06T17:43:30+00:00"
"time": "2022-03-20T21:55:58+00:00"
},
{
"name": "http-interop/http-factory-guzzle",
@@ -387,6 +387,65 @@
},
"time": "2021-07-21T13:50:14+00:00"
},
{
"name": "laravel/serializable-closure",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/serializable-closure.git",
"reference": "9e4b005daa20b0c161f3845040046dc9ddc1d74e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/9e4b005daa20b0c161f3845040046dc9ddc1d74e",
"reference": "9e4b005daa20b0c161f3845040046dc9ddc1d74e",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0"
},
"require-dev": {
"pestphp/pest": "^1.18",
"phpstan/phpstan": "^0.12.98",
"symfony/var-dumper": "^5.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Laravel\\SerializableClosure\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Taylor Otwell",
"email": "taylor@laravel.com"
},
{
"name": "Nuno Maduro",
"email": "nuno@laravel.com"
}
],
"description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.",
"keywords": [
"closure",
"laravel",
"serializable"
],
"support": {
"issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure"
},
"time": "2022-02-11T19:23:53+00:00"
},
{
"name": "nikic/fast-route",
"version": "v1.3.0",
@@ -437,71 +496,6 @@
},
"time": "2018-02-13T20:26:39+00:00"
},
{
"name": "opis/closure",
"version": "3.6.3",
"source": {
"type": "git",
"url": "https://github.com/opis/closure.git",
"reference": "3d81e4309d2a927abbe66df935f4bb60082805ad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opis/closure/zipball/3d81e4309d2a927abbe66df935f4bb60082805ad",
"reference": "3d81e4309d2a927abbe66df935f4bb60082805ad",
"shasum": ""
},
"require": {
"php": "^5.4 || ^7.0 || ^8.0"
},
"require-dev": {
"jeremeamia/superclosure": "^2.0",
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.6.x-dev"
}
},
"autoload": {
"psr-4": {
"Opis\\Closure\\": "src/"
},
"files": [
"functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marius Sarca",
"email": "marius.sarca@gmail.com"
},
{
"name": "Sorin Sarca",
"email": "sarca_sorin@hotmail.com"
}
],
"description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.",
"homepage": "https://opis.io/closure",
"keywords": [
"anonymous functions",
"closure",
"function",
"serializable",
"serialization",
"serialize"
],
"support": {
"issues": "https://github.com/opis/closure/issues",
"source": "https://github.com/opis/closure/tree/3.6.3"
},
"time": "2022-01-27T09:35:39+00:00"
},
{
"name": "php-di/invoker",
"version": "2.3.3",
@@ -559,21 +553,21 @@
},
{
"name": "php-di/php-di",
"version": "6.3.5",
"version": "6.4.0",
"source": {
"type": "git",
"url": "https://github.com/PHP-DI/PHP-DI.git",
"reference": "b8126d066ce144765300ee0ab040c1ed6c9ef588"
"reference": "ae0f1b3b03d8b29dff81747063cbfd6276246cc4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/b8126d066ce144765300ee0ab040c1ed6c9ef588",
"reference": "b8126d066ce144765300ee0ab040c1ed6c9ef588",
"url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/ae0f1b3b03d8b29dff81747063cbfd6276246cc4",
"reference": "ae0f1b3b03d8b29dff81747063cbfd6276246cc4",
"shasum": ""
},
"require": {
"opis/closure": "^3.5.5",
"php": ">=7.2.0",
"laravel/serializable-closure": "^1.0",
"php": ">=7.4.0",
"php-di/invoker": "^2.0",
"php-di/phpdoc-reader": "^2.0.1",
"psr/container": "^1.0"
@@ -582,12 +576,12 @@
"psr/container-implementation": "^1.0"
},
"require-dev": {
"doctrine/annotations": "~1.2",
"doctrine/annotations": "~1.10",
"friendsofphp/php-cs-fixer": "^2.4",
"mnapoli/phpunit-easymock": "^1.2",
"ocramius/proxy-manager": "^2.0.2",
"ocramius/proxy-manager": "^2.11.2",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^8.5|^9.0"
"phpunit/phpunit": "^9.5"
},
"suggest": {
"doctrine/annotations": "Install it if you want to use annotations (version ~1.2)",
@@ -595,12 +589,12 @@
},
"type": "library",
"autoload": {
"psr-4": {
"DI\\": "src/"
},
"files": [
"src/functions.php"
]
],
"psr-4": {
"DI\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -619,7 +613,7 @@
],
"support": {
"issues": "https://github.com/PHP-DI/PHP-DI/issues",
"source": "https://github.com/PHP-DI/PHP-DI/tree/6.3.5"
"source": "https://github.com/PHP-DI/PHP-DI/tree/6.4.0"
},
"funding": [
{
@@ -631,7 +625,7 @@
"type": "tidelift"
}
],
"time": "2021-09-02T09:49:58+00:00"
"time": "2022-04-09T16:46:38+00:00"
},
{
"name": "php-di/phpdoc-reader",
@@ -1192,22 +1186,22 @@
},
{
"name": "slim/slim",
"version": "4.9.0",
"version": "4.10.0",
"source": {
"type": "git",
"url": "https://github.com/slimphp/Slim.git",
"reference": "44d3c9c0bfcc47e52e42b097b6062689d21b904b"
"reference": "0dfc7d2fdf2553b361d864d51af3fe8a6ad168b0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/slimphp/Slim/zipball/44d3c9c0bfcc47e52e42b097b6062689d21b904b",
"reference": "44d3c9c0bfcc47e52e42b097b6062689d21b904b",
"url": "https://api.github.com/repos/slimphp/Slim/zipball/0dfc7d2fdf2553b361d864d51af3fe8a6ad168b0",
"reference": "0dfc7d2fdf2553b361d864d51af3fe8a6ad168b0",
"shasum": ""
},
"require": {
"ext-json": "*",
"nikic/fast-route": "^1.3",
"php": "^7.3 || ^8.0",
"php": "^7.4 || ^8.0",
"psr/container": "^1.0 || ^2.0",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0",
@@ -1218,13 +1212,15 @@
"require-dev": {
"adriansuter/php-autoload-override": "^1.2",
"ext-simplexml": "*",
"guzzlehttp/psr7": "^2.0",
"guzzlehttp/psr7": "^2.1",
"httpsoft/http-message": "^1.0",
"httpsoft/http-server-request": "^1.0",
"laminas/laminas-diactoros": "^2.8",
"nyholm/psr7": "^1.4",
"nyholm/psr7": "^1.5",
"nyholm/psr7-server": "^1.0",
"phpspec/prophecy": "^1.14",
"phpspec/prophecy": "^1.15",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/phpstan": "^0.12.99",
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": "^9.5",
"slim/http": "^1.2",
"slim/psr7": "^1.5",
@@ -1301,7 +1297,7 @@
"type": "tidelift"
}
],
"time": "2021-10-05T03:00:00+00:00"
"time": "2022-03-14T14:18:23+00:00"
},
{
"name": "slim/twig-view",
@@ -1370,16 +1366,16 @@
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.0.0",
"version": "v3.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced"
"reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced",
"reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
"reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
"shasum": ""
},
"require": {
@@ -1417,7 +1413,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0"
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1"
},
"funding": [
{
@@ -1433,11 +1429,11 @@
"type": "tidelift"
}
],
"time": "2021-11-01T23:48:49+00:00"
"time": "2022-01-02T09:55:41+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.24.0",
"version": "v1.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
@@ -1469,12 +1465,12 @@
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [
"bootstrap.php"
]
],
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1499,7 +1495,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
},
"funding": [
{
@@ -1519,7 +1515,7 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.24.0",
"version": "v1.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
@@ -1551,12 +1547,12 @@
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1582,7 +1578,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0"
},
"funding": [
{
@@ -1602,7 +1598,7 @@
},
{
"name": "symfony/polyfill-php81",
"version": "v1.24.0",
"version": "v1.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php81.git",
@@ -1661,7 +1657,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php81/tree/v1.24.0"
"source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0"
},
"funding": [
{
@@ -1681,16 +1677,16 @@
},
{
"name": "twig/twig",
"version": "v3.3.8",
"version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "972d8604a92b7054828b539f2febb0211dd5945c"
"reference": "8442df056c51b706793adf80a9fd363406dd3674"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c",
"reference": "972d8604a92b7054828b539f2febb0211dd5945c",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/8442df056c51b706793adf80a9fd363406dd3674",
"reference": "8442df056c51b706793adf80a9fd363406dd3674",
"shasum": ""
},
"require": {
@@ -1741,7 +1737,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.3.8"
"source": "https://github.com/twigphp/Twig/tree/v3.3.10"
},
"funding": [
{
@@ -1753,7 +1749,7 @@
"type": "tidelift"
}
],
"time": "2022-02-04T06:59:48+00:00"
"time": "2022-04-06T06:47:41+00:00"
}
],
"packages-dev": [],
@@ -1770,5 +1766,5 @@
"ext-apcu": "*"
},
"platform-dev": [],
"plugin-api-version": "2.2.0"
"plugin-api-version": "2.3.0"
}

View File

@@ -2,25 +2,29 @@
"production": [
{
"dependsOn": [
"nextcloud-aio-nextcloud",
"nextcloud-aio-onlyoffice",
"nextcloud-aio-collabora",
"nextcloud-aio-talk"
"nextcloud-aio-clamav",
"nextcloud-aio-talk",
"nextcloud-aio-nextcloud"
],
"identifier": "nextcloud-aio-apache",
"displayName": "Apache",
"containerName": "nextcloud/aio-apache",
"ports": [
"443/tcp"
"%APACHE_PORT%/tcp"
],
"internalPorts": [
"443"
"%APACHE_PORT%"
],
"secrets": [],
"environmentVariables": [
"NC_DOMAIN=%NC_DOMAIN%",
"NEXTCLOUD_HOST=nextcloud-aio-nextcloud",
"COLLABORA_HOST=nextcloud-aio-collabora",
"TALK_HOST=nextcloud-aio-talk"
"TALK_HOST=nextcloud-aio-talk",
"APACHE_PORT=%APACHE_PORT%",
"ONLYOFFICE_HOST=nextcloud-aio-onlyoffice"
],
"volumes": [
{
@@ -95,9 +99,14 @@
"writeable": true
},
{
"name": "nextcloud_aio_nextcloud_data",
"name": "%NEXTCLOUD_DATADIR%",
"location": "/mnt/ncdata",
"writeable": true
},
{
"name": "%NEXTCLOUD_MOUNT%",
"location": "%NEXTCLOUD_MOUNT%",
"writeable": true
}
],
"environmentVariables": [
@@ -114,10 +123,18 @@
"NEXTCLOUD_DATA_DIR=/mnt/ncdata",
"OVERWRITEHOST=%NC_DOMAIN%",
"OVERWRITEPROTOCOL=https",
"TRUSTED_PROXIES=127.0.0.1",
"TURN_SECRET=%TURN_SECRET%",
"SIGNALING_SECRET=%SIGNALING_SECRET%",
"AIO_URL=%AIO_URL%"
"AIO_URL=%AIO_URL%",
"NEXTCLOUD_MOUNT=%NEXTCLOUD_MOUNT%",
"CLAMAV_ENABLED=%CLAMAV_ENABLED%",
"CLAMAV_HOST=nextcloud-aio-clamav",
"ONLYOFFICE_ENABLED=%ONLYOFFICE_ENABLED%",
"COLLABORA_ENABLED=%COLLABORA_ENABLED%",
"COLLABORA_HOST=nextcloud-aio-collabora",
"TALK_ENABLED=%TALK_ENABLED%",
"ONLYOFFICE_HOST=nextcloud-aio-onlyoffice",
"DAILY_BACKUP_RUNNING=%DAILY_BACKUP_RUNNING%"
],
"maxShutdownTime": 10,
"restartPolicy": "unless-stopped"
@@ -151,7 +168,8 @@
"9980"
],
"environmentVariables": [
"domain=%NC_DOMAIN%"
"aliasgroup1=https://%NC_DOMAIN%:443",
"extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning"
],
"volumes": [],
"secrets": [],
@@ -194,7 +212,9 @@
"internalPorts": [],
"environmentVariables": [
"BORG_PASSWORD=%BORGBACKUP_PASSWORD%",
"BORG_MODE=%BORGBACKUP_MODE%"
"BORG_MODE=%BORGBACKUP_MODE%",
"SELECTED_RESTORE_TIME=%SELECTED_RESTORE_TIME%",
"BACKUP_RESTORE_PASSWORD=%BACKUP_RESTORE_PASSWORD%"
],
"volumes": [
{
@@ -208,7 +228,7 @@
"writeable": true
},
{
"name": "nextcloud_aio_nextcloud_data",
"name": "%NEXTCLOUD_DATADIR%",
"location": "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data",
"writeable": true
},
@@ -271,11 +291,12 @@
"displayName": "Domaincheck",
"containerName": "nextcloud/aio-domaincheck",
"ports": [
"443/tcp"
"%APACHE_PORT%/tcp"
],
"internalPorts": [],
"environmentVariables": [
"INSTANCE_ID=%INSTANCE_ID%"
"INSTANCE_ID=%INSTANCE_ID%",
"APACHE_PORT=%APACHE_PORT%"
],
"volumes": [],
"secrets": [
@@ -283,6 +304,48 @@
],
"maxShutdownTime": 1,
"restartPolicy": ""
},
{
"dependsOn": [],
"identifier": "nextcloud-aio-clamav",
"displayName": "ClamAV",
"containerName": "nextcloud/aio-clamav",
"ports": [],
"internalPorts": [
"3310"
],
"environmentVariables": [],
"volumes": [
{
"name": "nextcloud_aio_clamav",
"location": "/var/lib/clamav",
"writeable": true
}
],
"secrets": [],
"maxShutdownTime": 10,
"restartPolicy": "unless-stopped"
},
{
"dependsOn": [],
"identifier": "nextcloud-aio-onlyoffice",
"displayName": "OnlyOffice",
"containerName": "nextcloud/aio-onlyoffice",
"ports": [],
"internalPorts": [
"80"
],
"environmentVariables": [],
"volumes": [
{
"name": "nextcloud_aio_onlyoffice",
"location": "/var/lib/onlyoffice",
"writeable": true
}
],
"secrets": [],
"maxShutdownTime": 10,
"restartPolicy": "unless-stopped"
}
]
}

77
php/psalm-baseline.xml Normal file
View File

@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.23.0@f1fe6ff483bf325c803df9f510d09a03fd796f88">
<file src="public/index.php">
<MissingClosureParamType occurrences="10">
<code>$args</code>
<code>$args</code>
<code>$args</code>
<code>$args</code>
<code>$request</code>
<code>$request</code>
<code>$request</code>
<code>$response</code>
<code>$response</code>
<code>$response</code>
</MissingClosureParamType>
</file>
<file src="src/Controller/ConfigurationController.php">
<MissingParamType occurrences="1">
<code>$args</code>
</MissingParamType>
</file>
<file src="src/Controller/DockerController.php">
<MissingParamType occurrences="8">
<code>$args</code>
<code>$args</code>
<code>$args</code>
<code>$args</code>
<code>$args</code>
<code>$args</code>
<code>$args</code>
<code>$args</code>
</MissingParamType>
<PossiblyInvalidArrayAccess occurrences="1">
<code>$request-&gt;getParsedBody()['selected_restore_time']</code>
</PossiblyInvalidArrayAccess>
<PossiblyNullArrayAccess occurrences="1">
<code>$request-&gt;getParsedBody()['selected_restore_time']</code>
</PossiblyNullArrayAccess>
</file>
<file src="src/Controller/LoginController.php">
<MissingParamType occurrences="3">
<code>$args</code>
<code>$args</code>
<code>$args</code>
</MissingParamType>
<PossiblyInvalidArrayAccess occurrences="1">
<code>$request-&gt;getParsedBody()['password']</code>
</PossiblyInvalidArrayAccess>
<PossiblyNullArgument occurrences="1">
<code>$password</code>
</PossiblyNullArgument>
<PossiblyNullArrayAccess occurrences="1">
<code>$request-&gt;getParsedBody()['password']</code>
</PossiblyNullArrayAccess>
</file>
<file src="src/Docker/DockerActionManager.php">
<InvalidReturnType occurrences="1">
<code>IContainerState</code>
</InvalidReturnType>
<InvalidScalarArgument occurrences="1">
<code>$internalPort</code>
</InvalidScalarArgument>
<RedundantCondition occurrences="1">
<code>$container-&gt;GetInternalPorts() !== null</code>
</RedundantCondition>
</file>
<file src="src/Middleware/AuthMiddleware.php">
<UndefinedInterfaceMethod occurrences="1">
<code>withStatus</code>
</UndefinedInterfaceMethod>
</file>
<file src="src/Twig/ClassExtension.php">
<MissingParamType occurrences="1">
<code>$object</code>
</MissingParamType>
</file>
</files>

15
php/psalm.xml Normal file
View File

@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<psalm
errorLevel="2"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="templates"/>
<directory name="src"/>
<file name="public/index.php"/>
</projectFiles>
</psalm>

View File

@@ -0,0 +1,17 @@
if (document.hasFocus()) {
// hide reload button if the site reloads automatically
var list = document.getElementsByClassName("reload button");
for (var i = 0; i < list.length; i++) {
// list[i] is a node with the desired class name
list[i].style.display = 'none';
}
// set timeout for reload
setTimeout(function(){
window.location.reload(1);
}, 5000);
} else {
window.addEventListener("beforeunload", function() {
document.getElementById('overlay').classList.add('loading')
});
}

View File

@@ -0,0 +1,3 @@
window.addEventListener("beforeunload", function() {
document.getElementById('overlay').classList.add('loading')
});

View File

@@ -0,0 +1,5 @@
document.addEventListener("DOMContentLoaded", function(event) {
// Clamav
var clamav = document.getElementById("clamav");
clamav.disabled = true;
});

View File

@@ -0,0 +1,5 @@
document.addEventListener("DOMContentLoaded", function(event) {
// Collabora
var collabora = document.getElementById("collabora");
collabora.disabled = true;
});

View File

@@ -0,0 +1,5 @@
document.addEventListener("DOMContentLoaded", function(event) {
// OnlyOffice
var onlyoffice = document.getElementById("onlyoffice");
onlyoffice.disabled = true;
});

View File

@@ -0,0 +1,5 @@
document.addEventListener("DOMContentLoaded", function(event) {
// Talk
var talk = document.getElementById("talk");
talk.disabled = true;
});

View File

@@ -12,7 +12,7 @@
}
lastError = toast
body.prepend(toast)
setTimeout(toast.remove.bind(toast), 3000)
setTimeout(toast.remove.bind(toast), 7000)
}
function handleEvent(e) {

View File

@@ -22,11 +22,6 @@ ini_set('session.save_path', $dataConst->GetSessionDirectory());
// Auto logout on browser close
ini_set('session.cookie_lifetime', '0');
// Make sure to delete all stale sessions after at least one day
ini_set('session.gc_maxlifetime', '86400');
ini_set('session.gc_probability', '1');
ini_set('session.gc_divisor', '1');
// Create app
AppFactory::setContainer($container);
$app = AppFactory::create();
@@ -53,9 +48,11 @@ $app->add(new \AIO\Middleware\AuthMiddleware($container->get(\AIO\Auth\AuthManag
// API
$app->post('/api/docker/watchtower', AIO\Controller\DockerController::class . ':StartWatchtowerContainer');
$app->get('/api/docker/getwatchtower', AIO\Controller\DockerController::class . ':StartWatchtowerContainer');
$app->post('/api/docker/start', AIO\Controller\DockerController::class . ':StartContainer');
$app->post('/api/docker/backup', AIO\Controller\DockerController::class . ':StartBackupContainerBackup');
$app->post('/api/docker/backup-check', AIO\Controller\DockerController::class . ':StartBackupContainerCheck');
$app->post('/api/docker/backup-test', AIO\Controller\DockerController::class . ':StartBackupContainerTest');
$app->post('/api/docker/restore', AIO\Controller\DockerController::class . ':StartBackupContainerRestore');
$app->post('/api/docker/stop', AIO\Controller\DockerController::class . ':StopContainer');
$app->get('/api/docker/logs', AIO\Controller\DockerController::class . ':GetLogs');
@@ -77,16 +74,28 @@ $app->get('/containers', function ($request, $response, $args) use ($container)
return $view->render($response, 'containers.twig', [
'domain' => $configurationManager->GetDomain(),
'borg_backup_host_location' => $configurationManager->GetBorgBackupHostLocation(),
'borg_backup_mode' => $configurationManager->GetBorgBackupMode(),
'nextcloud_password' => $configurationManager->GetSecret('NEXTCLOUD_PASSWORD'),
'containers' => (new \AIO\ContainerDefinitionFetcher($container->get(\AIO\Data\ConfigurationManager::class), $container))->FetchDefinition(),
'borgbackup_password' => $configurationManager->GetSecret('BORGBACKUP_PASSWORD'),
'is_mastercontainer_update_available' => $dockerActionManger->IsMastercontainerUpdateAvailable(),
'has_backup_run_once' => $configurationManager->hasBackupRunOnce(),
'is_backup_container_running' => $dockerActionManger->isBackupContainerRunning(),
'backup_exit_code' => $dockerActionManger->GetBackupcontainerExitCode(),
'is_instance_restore_attempt' => $configurationManager->isInstanceRestoreAttempt(),
'borg_backup_mode' => $configurationManager->GetBorgBackupMode(),
'was_start_button_clicked' => $configurationManager->wasStartButtonClicked(),
'has_update_available' => $dockerActionManger->isAnyUpdateAvailable(),
'last_backup_time' => $configurationManager->GetLastBackupTime(),
'backup_times' => $configurationManager->GetBackupTimes(),
'current_channel' => $dockerActionManger->GetCurrentChannel(),
'is_x64_platform' => $configurationManager->isx64Platform(),
'is_clamav_enabled' => $configurationManager->isClamavEnabled(),
'is_onlyoffice_enabled' => $configurationManager->isOnlyofficeEnabled(),
'is_collabora_enabled' => $configurationManager->isCollaboraEnabled(),
'is_talk_enabled' => $configurationManager->isTalkEnabled(),
'borg_restore_password' => $configurationManager->GetBorgRestorePassword(),
'daily_backup_time' => $configurationManager->GetDailyBackupTime(),
'is_daily_backup_running' => $configurationManager->isDailyBackupRunning(),
]);
})->setName('profile');
$app->get('/login', function ($request, $response, $args) use ($container) {
@@ -141,4 +150,6 @@ $app->get('/', function (\Psr\Http\Message\RequestInterface $request, \Psr\Http\
}
});
$errorMiddleware = $app->addErrorMiddleware(true, true, true);
$app->run();

View File

@@ -0,0 +1,26 @@
function makeOptionsFormSubmitVisible() {
var optionsFormSubmit = document.getElementById("options-form-submit");
optionsFormSubmit.style.display = 'block';
}
document.addEventListener("DOMContentLoaded", function(event) {
// handle submit button for options form
var optionsFormSubmit = document.getElementById("options-form-submit");
optionsFormSubmit.style.display = 'none';
// Clamav
var clamav = document.getElementById("clamav");
clamav.addEventListener('change', makeOptionsFormSubmitVisible);
// OnlyOffice
var onlyoffice = document.getElementById("onlyoffice");
onlyoffice.addEventListener('change', makeOptionsFormSubmitVisible);
// Collabora
var collabora = document.getElementById("collabora");
collabora.addEventListener('change', makeOptionsFormSubmitVisible);
// Talk
var talk = document.getElementById("talk");
talk.addEventListener('change', makeOptionsFormSubmitVisible);
});

View File

@@ -23,6 +23,10 @@ a {
outline: none;
}
summary {
cursor: pointer;
}
ul {
list-style: none;
padding: 0;
@@ -136,7 +140,7 @@ input {
padding: 20px;
max-width: 100%;
word-break: break-word;
max-width: 450px;
max-width: 470px;
margin: 0 auto;
}

View File

@@ -91,6 +91,10 @@ class Container {
return $this->dockerActionManager->GetContainerRunningState($this);
}
public function GetRestartingState() : IContainerState {
return $this->dockerActionManager->GetContainerRestartingState($this);
}
public function GetUpdateState() : IContainerState {
return $this->dockerActionManager->GetContainerUpdateState($this);
}

View File

@@ -6,7 +6,7 @@ class ContainerVolumes {
/** @var ContainerVolume[] */
private array $volumes = [];
public function AddVolume(ContainerVolume $volume) {
public function AddVolume(ContainerVolume $volume) : void {
$this->volumes[] = $volume;
}

View File

@@ -0,0 +1,6 @@
<?php
namespace AIO\Container\State;
class NotRestartingState implements IContainerState
{}

View File

@@ -0,0 +1,6 @@
<?php
namespace AIO\Container\State;
class RestartingState implements IContainerState
{}

View File

@@ -27,7 +27,7 @@ class ContainerDefinitionFetcher
$this->container = $container;
}
public function GetContainerById(string $id): ?Container
public function GetContainerById(string $id): Container
{
$containers = $this->FetchDefinition();
@@ -37,7 +37,7 @@ class ContainerDefinitionFetcher
}
}
return null;
throw new \Exception("The provided id " . $id . " was not found in the container definition.");
}
/**
@@ -49,13 +49,37 @@ class ContainerDefinitionFetcher
$containers = [];
foreach ($data['production'] as $entry) {
if ($entry['identifier'] === 'nextcloud-aio-clamav') {
if (!$this->configurationManager->isClamavEnabled()) {
continue;
}
} elseif ($entry['identifier'] === 'nextcloud-aio-onlyoffice') {
if (!$this->configurationManager->isOnlyofficeEnabled()) {
continue;
}
} elseif ($entry['identifier'] === 'nextcloud-aio-collabora') {
if (!$this->configurationManager->isCollaboraEnabled()) {
continue;
}
} elseif ($entry['identifier'] === 'nextcloud-aio-talk') {
if (!$this->configurationManager->isTalkEnabled()) {
continue;
}
}
$ports = new ContainerPorts();
foreach ($entry['ports'] as $port) {
if($port === '%APACHE_PORT%/tcp') {
$port = $this->configurationManager->GetApachePort() . '/tcp';
}
$ports->AddPort($port);
}
$internalPorts = new ContainerInternalPorts();
foreach ($entry['internalPorts'] as $internalPort) {
if($internalPort === '%APACHE_PORT%') {
$internalPort = $this->configurationManager->GetApachePort();
}
$internalPorts->AddInternalPort($internalPort);
}
@@ -67,6 +91,23 @@ class ContainerDefinitionFetcher
continue;
}
}
if($value['name'] === '%NEXTCLOUD_MOUNT%') {
$value['name'] = $this->configurationManager->GetNextcloudMount();
if($value['name'] === '') {
continue;
}
} elseif ($value['name'] === '%NEXTCLOUD_DATADIR%') {
$value['name'] = $this->configurationManager->GetNextcloudDatadirMount();
if ($value['name'] === '') {
continue;
}
}
if($value['location'] === '%NEXTCLOUD_MOUNT%') {
$value['location'] = $this->configurationManager->GetNextcloudMount();
if($value['location'] === '') {
continue;
}
}
$volumes->AddVolume(
new ContainerVolume(
$value['name'],
@@ -76,6 +117,28 @@ class ContainerDefinitionFetcher
);
}
$dependsOn = [];
foreach ($entry['dependsOn'] as $value) {
if ($value === 'nextcloud-aio-clamav') {
if (!$this->configurationManager->isClamavEnabled()) {
continue;
}
} elseif ($value === 'nextcloud-aio-onlyoffice') {
if (!$this->configurationManager->isOnlyofficeEnabled()) {
continue;
}
} elseif ($value === 'nextcloud-aio-collabora') {
if (!$this->configurationManager->isCollaboraEnabled()) {
continue;
}
} elseif ($value === 'nextcloud-aio-talk') {
if (!$this->configurationManager->isTalkEnabled()) {
continue;
}
}
$dependsOn[] = $value;
}
$variables = new ContainerEnvironmentVariables();
foreach ($entry['environmentVariables'] as $value) {
$variables->AddVariable($value);
@@ -91,7 +154,7 @@ class ContainerDefinitionFetcher
$internalPorts,
$volumes,
$variables,
$entry['dependsOn'],
$dependsOn,
$entry['secrets'],
$this->container->get(DockerActionManager::class)
);

View File

@@ -22,11 +22,60 @@ class ConfigurationController
public function SetConfig(Request $request, Response $response, $args) : Response {
try {
if (isset($request->getParsedBody()['domain'])) {
$this->configurationManager->SetDomain($request->getParsedBody()['domain']);
$domain = $request->getParsedBody()['domain'] ?? '';
$this->configurationManager->SetDomain($domain);
}
if (isset($request->getParsedBody()['current-master-password']) || isset($request->getParsedBody()['new-master-password'])) {
$currentMasterPassword = $request->getParsedBody()['current-master-password'] ?? '';
$newMasterPassword = $request->getParsedBody()['new-master-password'] ?? '';
$this->configurationManager->ChangeMasterPassword($currentMasterPassword, $newMasterPassword);
}
if (isset($request->getParsedBody()['borg_backup_host_location'])) {
$this->configurationManager->SetBorgBackupHostLocation($request->getParsedBody()['borg_backup_host_location']);
$location = $request->getParsedBody()['borg_backup_host_location'] ?? '';
$this->configurationManager->SetBorgBackupHostLocation($location);
}
if (isset($request->getParsedBody()['borg_restore_host_location']) || isset($request->getParsedBody()['borg_restore_password'])) {
$restoreLocation = $request->getParsedBody()['borg_restore_host_location'] ?? '';
$borgPassword = $request->getParsedBody()['borg_restore_password'] ?? '';
$this->configurationManager->SetBorgRestoreHostLocationAndPassword($restoreLocation, $borgPassword);
}
if (isset($request->getParsedBody()['daily_backup_time'])) {
$dailyBackupTime = $request->getParsedBody()['daily_backup_time'] ?? '';
$this->configurationManager->SetDailyBackupTime($dailyBackupTime);
}
if (isset($request->getParsedBody()['delete_daily_backup_time'])) {
$this->configurationManager->DeleteDailyBackupTime();
}
if (isset($request->getParsedBody()['options-form'])) {
if (isset($request->getParsedBody()['collabora']) && isset($request->getParsedBody()['onlyoffice'])) {
throw new InvalidSettingConfigurationException("Collabora and Onlyoffice are not allowed to be enabled at the same time!");
}
if (isset($request->getParsedBody()['clamav'])) {
$this->configurationManager->SetClamavEnabledState(1);
} else {
$this->configurationManager->SetClamavEnabledState(0);
}
if (isset($request->getParsedBody()['onlyoffice'])) {
$this->configurationManager->SetOnlyofficeEnabledState(1);
} else {
$this->configurationManager->SetOnlyofficeEnabledState(0);
}
if (isset($request->getParsedBody()['collabora'])) {
$this->configurationManager->SetCollaboraEnabledState(1);
} else {
$this->configurationManager->SetCollaboraEnabledState(0);
}
if (isset($request->getParsedBody()['talk'])) {
$this->configurationManager->SetTalkEnabledState(1);
} else {
$this->configurationManager->SetTalkEnabledState(0);
}
}
return $response->withStatus(201)->withHeader('Location', '/');

View File

@@ -26,16 +26,26 @@ class DockerController
$this->configurationManager = $configurationManager;
}
private function PerformRecursiveContainerStart(string $id) {
private function PerformRecursiveContainerStart(string $id) : void {
$container = $this->containerDefinitionFetcher->GetContainerById($id);
foreach($container->GetDependsOn() as $dependency) {
$this->PerformRecursiveContainerStart($dependency);
}
$pullcontainer = true;
if ($id === 'nextcloud-aio-database') {
if ($this->dockerActionManager->GetDatabasecontainerExitCode() > 0) {
$pullcontainer = false;
}
}
$this->dockerActionManager->DeleteContainer($container);
$this->dockerActionManager->CreateVolumes($container);
$this->dockerActionManager->PullContainer($container);
if ($pullcontainer) {
$this->dockerActionManager->PullContainer($container);
} else {
error_log('Not pulling the latest database image because the container was not correctly shut down.');
}
$this->dockerActionManager->CreateContainer($container);
$this->dockerActionManager->StartContainer($container);
$this->dockerActionManager->ConnectContainerToNetwork($container);
@@ -44,8 +54,12 @@ class DockerController
public function GetLogs(Request $request, Response $response, $args) : Response
{
$id = $request->getQueryParams()['id'];
$container = $this->containerDefinitionFetcher->GetContainerById($id);
$logs = $this->dockerActionManager->GetLogs($container);
if (str_starts_with($id, 'nextcloud-aio-')) {
$logs = $this->dockerActionManager->GetLogs($id);
} else {
$logs = 'Container not found.';
}
$body = $response->getBody();
$body->write($logs);
@@ -56,6 +70,11 @@ class DockerController
}
public function StartBackupContainerBackup(Request $request, Response $response, $args) : Response {
$this->startBackup();
return $response->withStatus(201)->withHeader('Location', '/');
}
public function startBackup() : void {
$config = $this->configurationManager->GetConfig();
$config['backup-mode'] = 'backup';
$this->configurationManager->WriteConfig($config);
@@ -65,8 +84,6 @@ class DockerController
$id = 'nextcloud-aio-borgbackup';
$this->PerformRecursiveContainerStart($id);
return $response->withStatus(201)->withHeader('Location', '/');
}
public function StartBackupContainerCheck(Request $request, Response $response, $args) : Response {
@@ -83,6 +100,22 @@ class DockerController
public function StartBackupContainerRestore(Request $request, Response $response, $args) : Response {
$config = $this->configurationManager->GetConfig();
$config['backup-mode'] = 'restore';
$config['selected-restore-time'] = $request->getParsedBody()['selected_restore_time'];
$this->configurationManager->WriteConfig($config);
$id = self::TOP_CONTAINER;
$this->PerformRecursiveContainerStop($id);
$id = 'nextcloud-aio-borgbackup';
$this->PerformRecursiveContainerStart($id);
return $response->withStatus(201)->withHeader('Location', '/');
}
public function StartBackupContainerTest(Request $request, Response $response, $args) : Response {
$config = $this->configurationManager->GetConfig();
$config['backup-mode'] = 'test';
$config['instance_restore_attempt'] = 0;
$this->configurationManager->WriteConfig($config);
$id = self::TOP_CONTAINER;
@@ -105,6 +138,16 @@ class DockerController
$config['AIO_URL'] = $host . ':' . $port;
// set wasStartButtonClicked
$config['wasStartButtonClicked'] = 1;
$this->configurationManager->WriteConfig($config);
// Start container
$this->startTopContainer();
return $response->withStatus(201)->withHeader('Location', '/');
}
public function startTopContainer() : void {
$config = $this->configurationManager->GetConfig();
// set AIO_TOKEN
$config['AIO_TOKEN'] = bin2hex(random_bytes(24));
$this->configurationManager->WriteConfig($config);
@@ -115,24 +158,28 @@ class DockerController
$id = self::TOP_CONTAINER;
$this->PerformRecursiveContainerStart($id);
return $response->withStatus(201)->withHeader('Location', '/');
}
public function StartWatchtowerContainer(Request $request, Response $response, $args) : Response {
$id = 'nextcloud-aio-watchtower';
$this->PerformRecursiveContainerStart($id);
$this->startWatchtower();
return $response->withStatus(201)->withHeader('Location', '/');
}
private function PerformRecursiveContainerStop(string $id)
public function startWatchtower() : void {
$id = 'nextcloud-aio-watchtower';
$this->PerformRecursiveContainerStart($id);
}
private function PerformRecursiveContainerStop(string $id) : void
{
$container = $this->containerDefinitionFetcher->GetContainerById($id);
foreach($container->GetDependsOn() as $dependency) {
$this->PerformRecursiveContainerStop($dependency);
}
$this->dockerActionManager->DisconnectContainerFromNetwork($container);
// Disconnecting is not needed. This also allows to start the containers manually via docker-cli
//$this->dockerActionManager->DisconnectContainerFromNetwork($container);
$this->dockerActionManager->StopContainer($container);
}
@@ -144,28 +191,39 @@ class DockerController
return $response->withStatus(201)->withHeader('Location', '/');
}
public function StartDomaincheckContainer()
public function StartDomaincheckContainer() : void
{
# Don't start if domain is already set
if ($this->configurationManager->GetDomain() != '') {
if ($this->configurationManager->GetDomain() !== '' || $this->configurationManager->wasStartButtonClicked()) {
return;
}
$id = 'nextcloud-aio-domaincheck';
$container = $this->containerDefinitionFetcher->GetContainerById($id);
// don't start if the domaincheck is already running
if ($container->GetIdentifier() === $id && $container->GetRunningState() instanceof RunningState) {
return;
// don't start if apache is already running
} elseif ($container->GetIdentifier() === self::TOP_CONTAINER && $container->GetRunningState() instanceof RunningState) {
$cacheKey = 'domaincheckWasStarted';
$domaincheckContainer = $this->containerDefinitionFetcher->GetContainerById($id);
$apacheContainer = $this->containerDefinitionFetcher->GetContainerById(self::TOP_CONTAINER);
// Don't start if apache is already running
if ($apacheContainer->GetRunningState() instanceof RunningState) {
return;
// Don't start if domaincheck is already running
} elseif ($domaincheckContainer->GetRunningState() instanceof RunningState) {
$domaincheckWasStarted = apcu_fetch($cacheKey);
// Start domaincheck again when 10 minutes are over by not returning here
if($domaincheckWasStarted !== false && is_string($domaincheckWasStarted)) {
return;
}
}
$this->StopDomaincheckContainer();
$this->PerformRecursiveContainerStart($id);
// Cache the start for 10 minutes
apcu_add($cacheKey, '1', 600);
}
private function StopDomaincheckContainer()
private function StopDomaincheckContainer() : void
{
$id = 'nextcloud-aio-domaincheck';
$this->PerformRecursiveContainerStop($id);

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
// increase memory limit to 2GB
ini_set('memory_limit', '2048M');
use DI\Container;
require __DIR__ . '/../../vendor/autoload.php';
$container = \AIO\DependencyInjection::GetContainer();
/** @var \AIO\Docker\DockerActionManager $dockerActionManger */
$dockerActionManger = $container->get(\AIO\Docker\DockerActionManager::class);
/** @var \AIO\ContainerDefinitionFetcher $containerDefinitionFetcher */
$containerDefinitionFetcher = $container->get(\AIO\ContainerDefinitionFetcher::class);
$id = 'nextcloud-aio-nextcloud';
$nextcloudContainer = $containerDefinitionFetcher->GetContainerById($id);
$backupExitCode = $dockerActionManger->GetBackupcontainerExitCode();
if ($backupExitCode === 0) {
$dockerActionManger->sendNotification($nextcloudContainer, 'Daily backup successful!', 'You can get further info by looking at the backup logs in the AIO interface.');
}
if ($backupExitCode > 0) {
$dockerActionManger->sendNotification($nextcloudContainer, 'Daily backup failed!', 'You can get further info by looking at the backup logs in the AIO interface.');
}

View File

@@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
// increase memory limit to 2GB
ini_set('memory_limit', '2048M');
use DI\Container;
require __DIR__ . '/../../vendor/autoload.php';
$container = \AIO\DependencyInjection::GetContainer();
/** @var \AIO\Controller\DockerController $dockerController */
$dockerController = $container->get(\AIO\Controller\DockerController::class);
// Stop container and start backup
$dockerController->startBackup();
// Start apache
$dockerController->startTopContainer();

View File

@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
// increase memory limit to 2GB
ini_set('memory_limit', '2048M');
use DI\Container;
require __DIR__ . '/../../vendor/autoload.php';
$container = \AIO\DependencyInjection::GetContainer();
/** @var \AIO\Controller\DockerController $dockerController */
$dockerController = $container->get(\AIO\Controller\DockerController::class);
# Update the mastercontainer
$dockerController->startWatchtower();

View File

@@ -22,9 +22,9 @@ $isMastercontainerUpdateAvailable = $dockerActionManger->IsMastercontainerUpdate
$isAnyUpdateAvailable = $dockerActionManger->isAnyUpdateAvailable();
if ($isMastercontainerUpdateAvailable === true) {
$dockerActionManger->sendNotification($nextcloudContainer, 'Mastercontainer update available!', 'Please open your management interface to update it.');
$dockerActionManger->sendNotification($nextcloudContainer, 'Mastercontainer update available!', 'Please open your AIO interface to update it. If you do not want to do it manually each time, you can enable the daily backup feature from the AIO interface which also automatically updates the mastercontainer.');
}
if ($isAnyUpdateAvailable === true) {
$dockerActionManger->sendNotification($nextcloudContainer, 'Container updates available!', 'Please open your management interface to update them.');
$dockerActionManger->sendNotification($nextcloudContainer, 'Container updates available!', 'Please open your AIO interface to update them. If you do not want to do it manually each time, you can enable the daily backup feature from the AIO interface which also automatically updates your containers and your Nextcloud apps.');
}

View File

@@ -46,7 +46,7 @@ class ConfigurationManager
return $config['secrets'][$secretId];
}
private function DoubleSafeBackupSecret(string $borgBackupPassword) {
private function DoubleSafeBackupSecret(string $borgBackupPassword) : void {
file_put_contents(DataConst::GetBackupSecretFile(), $borgBackupPassword);
}
@@ -64,7 +64,7 @@ class ConfigurationManager
}
$content = file_get_contents(DataConst::GetBackupArchivesList());
if ($content === "") {
if ($content === '') {
return '';
}
@@ -83,6 +83,31 @@ class ConfigurationManager
return $lastBackupTime;
}
public function GetBackupTimes() : array {
if (!file_exists(DataConst::GetBackupArchivesList())) {
return [];
}
$content = file_get_contents(DataConst::GetBackupArchivesList());
if ($content === '') {
return [];
}
$backupLines = explode("\n", $content);
$backupTimes = [];
foreach($backupLines as $lines) {
if ($lines !== "") {
$backupTimesTemp = explode(',', $lines);
$backupTimes[] = $backupTimesTemp[1];
}
}
// Reverse the array to list newest backup first
$backupTimes = array_reverse($backupTimes);
return $backupTimes;
}
public function wasStartButtonClicked() : bool {
if (isset($this->GetConfig()['wasStartButtonClicked'])) {
return true;
@@ -91,15 +116,88 @@ class ConfigurationManager
}
}
public function isx64Platform() : bool {
if (php_uname('m') === 'x86_64') {
return true;
} else {
return false;
}
}
public function isClamavEnabled() : bool {
$config = $this->GetConfig();
if (isset($config['isClamavEnabled']) && $config['isClamavEnabled'] === 1) {
return true;
} else {
return false;
}
}
public function SetClamavEnabledState(int $value) : void {
$config = $this->GetConfig();
$config['isClamavEnabled'] = $value;
$this->WriteConfig($config);
}
public function isOnlyofficeEnabled() : bool {
$config = $this->GetConfig();
if (isset($config['isOnlyofficeEnabled']) && $config['isOnlyofficeEnabled'] === 1) {
return true;
} else {
return false;
}
}
public function SetOnlyofficeEnabledState(int $value) : void {
$config = $this->GetConfig();
$config['isOnlyofficeEnabled'] = $value;
$this->WriteConfig($config);
}
public function isCollaboraEnabled() : bool {
$config = $this->GetConfig();
if (isset($config['isCollaboraEnabled']) && $config['isCollaboraEnabled'] === 0) {
return false;
} else {
return true;
}
}
public function SetCollaboraEnabledState(int $value) : void {
$config = $this->GetConfig();
$config['isCollaboraEnabled'] = $value;
$this->WriteConfig($config);
}
public function isTalkEnabled() : bool {
$config = $this->GetConfig();
if (isset($config['isTalkEnabled']) && $config['isTalkEnabled'] === 0) {
return false;
} else {
return true;
}
}
public function SetTalkEnabledState(int $value) : void {
$config = $this->GetConfig();
$config['isTalkEnabled'] = $value;
$this->WriteConfig($config);
}
/**
* @throws InvalidSettingConfigurationException
*/
public function SetDomain(string $domain) : void {
// Validate URL
if (!filter_var('http://' . $domain, FILTER_VALIDATE_URL)) {
// Validate domain
if (!filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {
throw new InvalidSettingConfigurationException("Domain is not in a valid format!");
}
// Validate that it is not an IP-address
if(filter_var($domain, FILTER_VALIDATE_IP)) {
throw new InvalidSettingConfigurationException("Please enter a domain and not an IP-address!");
}
$dnsRecordIP = gethostbyname($domain);
// Validate IP
@@ -117,20 +215,30 @@ class ConfigurationManager
// Get Instance ID
$instanceID = $this->GetSecret('INSTANCE_ID');
// set protocol
$port = $this->GetApachePort();
if ($port !== '443') {
$protocol = 'https://';
} else {
$protocol = 'http://';
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://' . $domain . ':443');
curl_setopt($ch, CURLOPT_URL, $protocol . $domain . ':443');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$response = (string)curl_exec($ch);
# Get rid of trailing \n
$response = str_replace("\n", "", $response);
if($response !== $instanceID) {
throw new InvalidSettingConfigurationException("Domain does not point to this server.");
throw new InvalidSettingConfigurationException("Domain does not point to this server or reverse proxy not configured correctly.");
}
// Write domain
$config = $this->GetConfig();
$config['domain'] = $domain;
// Reset the borg restore password when setting the domain
$config['borg_restore_password'] = '';
$this->WriteConfig($config);
}
@@ -152,6 +260,15 @@ class ConfigurationManager
return $config['backup-mode'];
}
public function GetSelectedRestoreTime() : string {
$config = $this->GetConfig();
if(!isset($config['selected-restore-time'])) {
$config['selected-restore-time'] = '';
}
return $config['selected-restore-time'];
}
public function GetAIOURL() : string {
$config = $this->GetConfig();
if(!isset($config['AIO_URL'])) {
@@ -165,25 +282,13 @@ class ConfigurationManager
* @throws InvalidSettingConfigurationException
*/
public function SetBorgBackupHostLocation(string $location) : void {
$allowedPrefixes = [
'/mnt/',
'/media/',
];
$isValidPath = false;
foreach($allowedPrefixes as $allowedPrefix) {
if(str_starts_with($location, $allowedPrefix) && !str_ends_with($location, '/')) {
$isValidPath = true;
break;
}
if ($location === '/var/backups') {
$isValidPath = true;
break;
}
if (str_starts_with($location, '/') && !str_ends_with($location, '/')) {
$isValidPath = true;
}
if(!$isValidPath) {
throw new InvalidSettingConfigurationException("The path must start with '/mnt/' or '/media/' or be equal to '/var/backups'.");
if (!$isValidPath) {
throw new InvalidSettingConfigurationException("The path must start with '/', and must not end with '/'!");
}
@@ -192,6 +297,69 @@ class ConfigurationManager
$this->WriteConfig($config);
}
/**
* @throws InvalidSettingConfigurationException
*/
public function SetBorgRestoreHostLocationAndPassword(string $location, string $password) : void {
if ($location === '') {
throw new InvalidSettingConfigurationException("Please enter a path!");
}
$isValidPath = false;
if (str_starts_with($location, '/') && !str_ends_with($location, '/')) {
$isValidPath = true;
}
if (!$isValidPath) {
throw new InvalidSettingConfigurationException("The path must start with '/', and must not end with '/'!");
}
if ($password === '') {
throw new InvalidSettingConfigurationException("Please enter the password!");
}
$config = $this->GetConfig();
$config['borg_backup_host_location'] = $location;
$config['borg_restore_password'] = $password;
$config['instance_restore_attempt'] = 1;
$this->WriteConfig($config);
}
/**
* @throws InvalidSettingConfigurationException
*/
public function ChangeMasterPassword(string $currentPassword, string $newPassword) : void {
if ($currentPassword === '') {
throw new InvalidSettingConfigurationException("Please enter your current password.");
}
if ($currentPassword !== $this->GetPassword()) {
throw new InvalidSettingConfigurationException("The entered current password is not correct.");
}
if ($newPassword === '') {
throw new InvalidSettingConfigurationException("Please enter a new password.");
}
if (strlen($newPassword) < 24) {
throw new InvalidSettingConfigurationException("New passwords must be >= 24 digits.");
}
if (!preg_match("#^[a-zA-Z0-9 ]+$#", $newPassword)) {
throw new InvalidSettingConfigurationException('Not allowed characters in the new password.');
}
// All checks pass so set the password
$this->SetPassword($newPassword);
}
public function GetApachePort() : string {
$envVariableName = 'APACHE_PORT';
$configName = 'apache_port';
$defaultValue = '443';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}
/**
* @throws InvalidSettingConfigurationException
*/
@@ -202,6 +370,28 @@ class ConfigurationManager
file_put_contents(DataConst::GetConfigFile(), json_encode($config));
}
private function GetEnvironmentalVariableOrConfig(string $envVariableName, string $configName, string $defaultValue) : string {
$envVariableOutput = getenv($envVariableName);
if ($envVariableOutput === false) {
$config = $this->GetConfig();
if (!isset($config[$configName]) || $config[$configName] === '') {
$config[$configName] = $defaultValue;
}
return $config[$configName];
}
if(file_exists(DataConst::GetConfigFile())) {
$config = $this->GetConfig();
if (!isset($config[$configName])) {
$config[$configName] = '';
}
if ($envVariableOutput !== $config[$configName]) {
$config[$configName] = $envVariableOutput;
$this->WriteConfig($config);
}
}
return $envVariableOutput;
}
public function GetBorgBackupHostLocation() : string {
$config = $this->GetConfig();
if(!isset($config['borg_backup_host_location'])) {
@@ -211,6 +401,27 @@ class ConfigurationManager
return $config['borg_backup_host_location'];
}
public function GetBorgRestorePassword() : string {
$config = $this->GetConfig();
if(!isset($config['borg_restore_password'])) {
$config['borg_restore_password'] = '';
}
return $config['borg_restore_password'];
}
public function isInstanceRestoreAttempt() : bool {
$config = $this->GetConfig();
if(!isset($config['instance_restore_attempt'])) {
$config['instance_restore_attempt'] = '';
}
if ($config['instance_restore_attempt'] === 1) {
return true;
}
return false;
}
public function GetBorgBackupMode() : string {
$config = $this->GetConfig();
if(!isset($config['backup-mode'])) {
@@ -219,4 +430,53 @@ class ConfigurationManager
return $config['backup-mode'];
}
public function GetNextcloudMount() : string {
$envVariableName = 'NEXTCLOUD_MOUNT';
$configName = 'nextcloud_mount';
$defaultValue = '';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}
public function GetNextcloudDatadirMount() : string {
$envVariableName = 'NEXTCLOUD_DATADIR';
$configName = 'nextcloud_datadir';
$defaultValue = 'nextcloud_aio_nextcloud_data';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}
/**
* @throws InvalidSettingConfigurationException
*/
public function SetDailyBackupTime(string $time) : void {
if ($time === "") {
throw new InvalidSettingConfigurationException("The daily backup time must not be empty!");
}
if (!preg_match("#^[0-1][0-9]:[0-5][0-9]$#", $time) && !preg_match("#^2[0-3]:[0-5][0-9]$#", $time)) {
throw new InvalidSettingConfigurationException("You did not enter a correct time! One correct example is '04:00'!");
}
file_put_contents(DataConst::GetDailyBackupTimeFile(), $time);
}
public function GetDailyBackupTime() : string {
if (!file_exists(DataConst::GetDailyBackupTimeFile())) {
return '';
}
return file_get_contents(DataConst::GetDailyBackupTimeFile());
}
public function DeleteDailyBackupTime() : void {
if (file_exists(DataConst::GetDailyBackupTimeFile())) {
unlink(DataConst::GetDailyBackupTimeFile());
}
}
public function isDailyBackupRunning() : bool {
if (file_exists(DataConst::GetDailyBackupBlockFile())) {
return true;
}
return false;
}
}

View File

@@ -27,6 +27,14 @@ class DataConst {
return self::GetDataDirectory() . '/backupsecret';
}
public static function GetDailyBackupTimeFile() : string {
return self::GetDataDirectory() . '/daily_backup_time';
}
public static function GetDailyBackupBlockFile() : string {
return self::GetDataDirectory() . '/daily_backup_running';
}
public static function GetBackupKeyFile() : string {
return self::GetDataDirectory() . '/borg.config';
}

View File

@@ -7,6 +7,8 @@ use AIO\Container\State\IContainerState;
use AIO\Container\State\ImageDoesNotExistState;
use AIO\Container\State\StartingState;
use AIO\Container\State\RunningState;
use AIO\Container\State\RestartingState;
use AIO\Container\State\NotRestartingState;
use AIO\Container\State\VersionDifferentState;
use AIO\Container\State\StoppedState;
use AIO\Container\State\VersionEqualState;
@@ -70,18 +72,46 @@ class DockerActionManager
}
}
public function GetContainerRestartingState(Container $container) : IContainerState
{
$url = $this->BuildApiUrl(sprintf('containers/%s/json', urlencode($container->GetIdentifier())));
try {
$response = $this->guzzleClient->get($url);
} catch (RequestException $e) {
if ($e->getCode() === 404) {
return new ImageDoesNotExistState();
}
throw $e;
}
$responseBody = json_decode((string)$response->getBody(), true);
if ($responseBody['State']['Restarting'] === true) {
return new RestartingState();
} else {
return new NotRestartingState();
}
}
public function GetContainerUpdateState(Container $container) : IContainerState
{
$tag = $this->GetCurrentChannel();
$runningDigest = $this->GetRepoDigestOfContainer($container->GetIdentifier());
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($container->GetContainerName(), $tag);
if ($runningDigest === $remoteDigest) {
return new VersionEqualState();
} else {
$runningDigests = $this->GetRepoDigestsOfContainer($container->GetIdentifier());
if ($runningDigests === null) {
return new VersionDifferentState();
}
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($container->GetContainerName(), $tag);
if ($remoteDigest === null) {
return new VersionEqualstate();
}
foreach($runningDigests as $runningDigest) {
if ($runningDigest === $remoteDigest) {
return new VersionEqualState();
}
}
return new VersionDifferentState();
}
public function GetContainerStartingState(Container $container) : IContainerState
@@ -109,7 +139,7 @@ class DockerActionManager
}
}
public function DeleteContainer(Container $container) {
public function DeleteContainer(Container $container) : void {
$url = $this->BuildApiUrl(sprintf('containers/%s?v=true', urlencode($container->GetIdentifier())));
try {
$this->guzzleClient->delete($url);
@@ -120,12 +150,12 @@ class DockerActionManager
}
}
public function GetLogs(Container $container) : string
public function GetLogs(string $id) : string
{
$url = $this->BuildApiUrl(
sprintf(
'containers/%s/logs?stdout=true&stderr=true',
urlencode($container->GetIdentifier())
urlencode($id)
));
$responseBody = (string)$this->guzzleClient->get($url)->getBody();
@@ -142,12 +172,12 @@ class DockerActionManager
return $response;
}
public function StartContainer(Container $container) {
public function StartContainer(Container $container) : void {
$url = $this->BuildApiUrl(sprintf('containers/%s/start', urlencode($container->GetIdentifier())));
$this->guzzleClient->post($url);
}
public function CreateVolumes(Container $container)
public function CreateVolumes(Container $container): void
{
$url = $this->BuildApiUrl('volumes/create');
foreach($container->GetVolumes()->GetVolumes() as $volume) {
@@ -170,7 +200,7 @@ class DockerActionManager
}
}
public function CreateContainer(Container $container) {
public function CreateContainer(Container $container) : void {
$volumes = [];
foreach($container->GetVolumes()->GetVolumes() as $volume) {
$volumeEntry = $volume->name . ':' . $volume->mountPoint;
@@ -212,6 +242,44 @@ class DockerActionManager
$replacements[1] = $this->configurationManager->GetBackupMode();
} elseif ($out[1] === 'AIO_URL') {
$replacements[1] = $this->configurationManager->GetAIOURL();
} elseif ($out[1] === 'SELECTED_RESTORE_TIME') {
$replacements[1] = $this->configurationManager->GetSelectedRestoreTime();
} elseif ($out[1] === 'APACHE_PORT') {
$replacements[1] = $this->configurationManager->GetApachePort();
} elseif ($out[1] === 'NEXTCLOUD_MOUNT') {
$replacements[1] = $this->configurationManager->GetNextcloudMount();
} elseif ($out[1] === 'BACKUP_RESTORE_PASSWORD') {
$replacements[1] = $this->configurationManager->GetBorgRestorePassword();
} elseif ($out[1] === 'CLAMAV_ENABLED') {
if ($this->configurationManager->isClamavEnabled()) {
$replacements[1] = 'yes';
} else {
$replacements[1] = '';
}
} elseif ($out[1] === 'ONLYOFFICE_ENABLED') {
if ($this->configurationManager->isOnlyofficeEnabled()) {
$replacements[1] = 'yes';
} else {
$replacements[1] = '';
}
} elseif ($out[1] === 'COLLABORA_ENABLED') {
if ($this->configurationManager->isCollaboraEnabled()) {
$replacements[1] = 'yes';
} else {
$replacements[1] = '';
}
} elseif ($out[1] === 'TALK_ENABLED') {
if ($this->configurationManager->isTalkEnabled()) {
$replacements[1] = 'yes';
} else {
$replacements[1] = '';
}
} elseif ($out[1] === 'DAILY_BACKUP_RUNNING') {
if ($this->configurationManager->isDailyBackupRunning()) {
$replacements[1] = 'yes';
} else {
$replacements[1] = '';
}
} else {
$replacements[1] = $this->configurationManager->GetSecret($out[1]);
}
@@ -246,22 +314,30 @@ class DockerActionManager
}
$url = $this->BuildApiUrl('containers/create?name=' . $container->GetIdentifier());
$this->guzzleClient->request(
'POST',
$url,
[
'json' => $requestBody
]
);
try {
$this->guzzleClient->request(
'POST',
$url,
[
'json' => $requestBody
]
);
} catch (RequestException $e) {
throw $e;
}
}
public function PullContainer(Container $container)
public function PullContainer(Container $container) : void
{
$url = $this->BuildApiUrl(sprintf('images/create?fromImage=%s', urlencode($this->BuildImageName($container))));
try {
$this->guzzleClient->post($url);
} catch (RequestException $e) {
throw $e;
error_log('Could not get image ' . $this->BuildImageName($container) . ' from docker hub. Probably due to rate limits. ' . $e->getMessage());
// Don't exit here because it is possible that the image is already present
// and we ran into docker hub limits.
// We will exit later if not image should be available.
}
}
@@ -279,10 +355,9 @@ class DockerActionManager
return $updateAvailable;
}
public function isAnyUpdateAvailable() {
public function isAnyUpdateAvailable() : bool {
$id = 'nextcloud-aio-apache';
if ($this->isContainerUpdateAvailable($id) !== "") {
return true;
} else {
@@ -290,7 +365,7 @@ class DockerActionManager
}
}
private function GetRepoDigestOfContainer(string $containerName) : ?string {
private function GetRepoDigestsOfContainer(string $containerName) : ?array {
try {
$containerUrl = $this->BuildApiUrl(sprintf('containers/%s/json', $containerName));
$containerOutput = json_decode($this->guzzleClient->get($containerUrl)->getBody()->getContents(), true);
@@ -299,10 +374,30 @@ class DockerActionManager
$imageUrl = $this->BuildApiUrl(sprintf('images/%s/json', $imageName));
$imageOutput = json_decode($this->guzzleClient->get($imageUrl)->getBody()->getContents(), true);
if(isset($imageOutput['RepoDigests']) && count($imageOutput['RepoDigests']) === 1) {
$fullDigest = $imageOutput['RepoDigests'][0];
if (!isset($imageOutput['RepoDigests'])) {
error_log('RepoDigests is not set of container ' . $containerName);
return null;
}
return substr($fullDigest, strpos($fullDigest, "@") + 1);
if (!is_array($imageOutput['RepoDigests'])) {
error_log('RepoDigests of ' . $containerName . ' is not an array which is not allowed!');
return null;
}
$repoDigestArray = [];
$oneDigestGiven = false;
foreach($imageOutput['RepoDigests'] as $repoDigest) {
$digestPosition = strpos($repoDigest, '@');
if ($digestPosition === false) {
error_log('Somehow the RepoDigest of ' . $containerName . ' does not contain a @.');
return null;
}
$repoDigestArray[] = substr($repoDigest, $digestPosition + 1);
$oneDigestGiven = true;
}
if ($oneDigestGiven) {
return $repoDigestArray;
}
return null;
@@ -328,6 +423,7 @@ class DockerActionManager
apcu_add($cacheKey, $tag);
return $tag;
} catch (\Exception $e) {
error_log('Could not get current channel ' . $e->getMessage());
}
return 'latest';
@@ -340,17 +436,24 @@ class DockerActionManager
$tag = $this->GetCurrentChannel();
$runningDigest = $this->GetRepoDigestOfContainer($containerName);
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($imageName, $tag);
if ($remoteDigest === $runningDigest) {
return false;
} else {
$runningDigests = $this->GetRepoDigestsOfContainer($containerName);
if ($runningDigests === null) {
return true;
}
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($imageName, $tag);
if ($remoteDigest === null) {
return false;
}
foreach ($runningDigests as $runningDigest) {
if ($remoteDigest === $runningDigest) {
return false;
}
}
return true;
}
public function sendNotification(Container $container, string $subject, string $message)
public function sendNotification(Container $container, string $subject, string $message) : void
{
if ($this->GetContainerStartingState($container) instanceof RunningState) {
@@ -396,7 +499,7 @@ class DockerActionManager
}
}
public function DisconnectContainerFromNetwork(Container $container)
public function DisconnectContainerFromNetwork(Container $container) : void
{
$url = $this->BuildApiUrl(
@@ -414,10 +517,11 @@ class DockerActionManager
]
);
} catch (RequestException $e) {
error_log('Could not disconnect container from network ' . $e->getMessage());
}
}
private function ConnectContainerIdToNetwork(string $id)
private function ConnectContainerIdToNetwork(string $id) : void
{
$url = $this->BuildApiUrl('networks/create');
try {
@@ -460,17 +564,17 @@ class DockerActionManager
}
}
public function ConnectMasterContainerToNetwork()
public function ConnectMasterContainerToNetwork() : void
{
$this->ConnectContainerIdToNetwork('nextcloud-aio-mastercontainer');
}
public function ConnectContainerToNetwork(Container $container)
public function ConnectContainerToNetwork(Container $container) : void
{
$this->ConnectContainerIdToNetwork($container->GetIdentifier());
}
public function StopContainer(Container $container) {
public function StopContainer(Container $container) : void {
$url = $this->BuildApiUrl(sprintf('containers/%s/stop?t=%s', urlencode($container->GetIdentifier()), $container->GetMaxShutdownTime()));
try {
$this->guzzleClient->post($url);
@@ -504,6 +608,29 @@ class DockerActionManager
}
}
public function GetDatabasecontainerExitCode() : int
{
$containerName = 'nextcloud-aio-database';
$url = $this->BuildApiUrl(sprintf('containers/%s/json', urlencode($containerName)));
try {
$response = $this->guzzleClient->get($url);
} catch (RequestException $e) {
if ($e->getCode() === 404) {
return -1;
}
throw $e;
}
$responseBody = json_decode((string)$response->getBody(), true);
$exitCode = $responseBody['State']['ExitCode'];
if (is_int($exitCode)) {
return $exitCode;
} else {
return -1;
}
}
public function isLoginAllowed() : bool {
$id = 'nextcloud-aio-apache';
$apacheContainer = $this->containerDefinitionFetcher->GetContainerById($id);
@@ -512,4 +639,13 @@ class DockerActionManager
}
return true;
}
public function isBackupContainerRunning() : bool {
$id = 'nextcloud-aio-borgbackup';
$backupContainer = $this->containerDefinitionFetcher->GetContainerById($id);
if ($this->GetContainerRunningState($backupContainer) instanceof RunningState) {
return true;
}
return false;
}
}

View File

@@ -23,6 +23,8 @@ class DockerHubManager
return $cachedVersion;
}
// If one of the links below should ever become outdated, we can still upgrade the mastercontainer via the webinterface manually by opening '/api/docker/getwatchtower'
try {
$authTokenRequest = $this->guzzleClient->request(
'GET',
@@ -50,8 +52,10 @@ class DockerHubManager
}
}
error_log('Could not get digest of container ' . $name . ':' . $tag);
return null;
} catch (\Exception $e) {
error_log('Could not get digest of container ' . $name . ':' . $tag . ' ' . $e->getMessage());
return null;
}
}

View File

@@ -16,63 +16,185 @@
</header>
<div class="content">
<h1>Nextcloud AIO Beta v0.3.0</h1>
This is beta software and not production ready.<br><br>
<h1>Nextcloud AIO v1.2.0</h1>
{% set isAnyRunning = false %}
{% set isAnyRestarting = false %}
{% set isWatchtowerRunning = false %}
{% set isBackupContainerRunning = false %}
{% set isRestoreRunning = false %}
{% set isBackupOrRestoreRunning = false %}
{% set isApacheStarting = false %}
{% if is_backup_container_running == true %}
{% if borg_backup_mode == 'restore' %}
{% set isRestoreRunning = true %}
{% endif %}
{% if borg_backup_mode == 'backup' or borg_backup_mode == 'restore' %}
{% set isBackupOrRestoreRunning = true %}
{% endif %}
{% endif %}
{% for container in containers %}
{% if class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' and container.GetIdentifier() != 'nextcloud-aio-domaincheck' and container.GetIdentifier() != 'nextcloud-aio-borgbackup' and container.GetIdentifier() != 'nextcloud-aio-watchtower' %}
{% if container.GetIdentifier() not in ['nextcloud-aio-domaincheck', 'nextcloud-aio-borgbackup', 'nextcloud-aio-watchtower'] and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %}
{% set isAnyRunning = true %}
{% endif %}
{% if container.GetIdentifier() not in ['nextcloud-aio-domaincheck', 'nextcloud-aio-borgbackup', 'nextcloud-aio-watchtower'] and class(container.GetRestartingState()) == 'AIO\\Container\\State\\RestartingState' %}
{% set isAnyRestarting = true %}
{% endif %}
{% if container.GetIdentifier() == 'nextcloud-aio-watchtower' and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %}
{% set isWatchtowerRunning = true %}
{% endif %}
{% if container.GetIdentifier() == 'nextcloud-aio-apache' and class(container.GetStartingState()) == 'AIO\\Container\\State\\StartingState' %}
{% set isApacheStarting = true %}
{% endif %}
{% if container.GetIdentifier() == 'nextcloud-aio-borgbackup' and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %}
{% set isBackupContainerRunning = true %}
{% if borg_backup_mode == 'restore' %}
{% set isRestoreRunning = true %}
{% endif %}
{% if borg_backup_mode == 'backup' or borg_backup_mode == 'restore' %}
{% set isBackupOrRestoreRunning = true %}
{% endif %}
{% endif %}
{% endfor %}
{% if isWatchtowerRunning == true %}
Mastercontainer updpate currently running. It will restart the mastercontainer soon which will make it unavailable for a moment. Please wait until thats done.<br /><br />
{% if is_daily_backup_running == true %}
<span class="status running"></span> Daily backup currently running. (<a href="/api/docker/logs?id=nextcloud-aio-mastercontainer">Logs</a>)<br /><br />
It will update your containers, the mastercontainer and your Nextcloud apps if the backup is successful.<br /><br />
{% if is_mastercontainer_update_available == true %}
Since the mastercontainer gets updated, it will restart the container which will make it unavailable for a moment. (<a href="/api/docker/logs?id=nextcloud-aio-watchtower">Logs</a>)<br /><br />
{% endif %}
{% if has_update_available == false %}
The whole process should not take more than a few minutes.<br /><br />
{% else %}
The whole process can take a while because your containers get updated.<br /><br />
{% endif %}
<a href="" class="button reload">Reload ↻</a><br/>
{% elseif isWatchtowerRunning == true %}
<span class="status running"></span> Mastercontainer update currently running. It will restart the mastercontainer soon which will make it unavailable for a moment. Please wait until that's done. (<a href="/api/docker/logs?id=nextcloud-aio-watchtower">Logs</a>)<br /><br />
<a href="" class="button reload">Reload ↻</a><br/>
{% else %}
{% if isBackupOrRestoreRunning == false and domain == "" %}
Please type in the domain that will be used for Nextcloud:<br><br />
<form method="POST" action="/api/configuration" class="xhr">
<input type="text" name="domain" value="{{ domain }}" placeholder="nextcloud.yourdomain.com"/>
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Submit" />
</form>
Make sure that this server is reachable on Port 443 and you've correctly set up the DNS config for the domain that you enter. <br><br>
If you have a dynamic IP-address, you can use e.g. <a href="https://ddclient.net/">DDclient</a> with a compatible domain provider for DNS updates.
{% if is_backup_container_running == false and domain == "" %}
{% if is_mastercontainer_update_available == true %}
<h2>Mastercontainer update</h2>
⚠ A mastercontainer update is available. Please click on the button below to update it. Afterwards, you will be able to proceed with the setup.<br><br>
<form method="POST" action="/api/docker/watchtower" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Update mastercontainer" />
</form>
{% else %}
{% if borg_backup_host_location == '' and borg_restore_password == '' %}
Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.<br><br>
<h2>New AIO instance</h2>
Please type in the domain that will be used for Nextcloud if you want to create a new instance:<br><br />
<form method="POST" action="/api/configuration" class="xhr">
<input type="text" name="domain" value="{{ domain }}" placeholder="nextcloud.yourdomain.com"/>
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Submit" />
</form>
Make sure that this server is reachable on Port 443 and you've correctly set up the DNS config for the domain that you enter. <br><br>
If you have a dynamic IP-address, you can use e.g. <a href="https://ddclient.net/">DDclient</a> with a compatible domain provider for DNS updates. <br /><br/>
<h2>Restore former AIO instance from backup</h2>
You can alternatively restore a former AIO instance from backup.<br><br>
{% endif %}
{% if is_instance_restore_attempt == false %}
{% if borg_backup_host_location != '' and borg_restore_password != '' %}
{% if borg_backup_mode in ['test', 'check'] %}
{% if backup_exit_code > 0 %}
<span class="status error"></span> Last {{ borg_backup_mode }} failed! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
{% if borg_backup_mode == 'test' %}
Please adjust the path and/or the password in order to make it work!<br><br>
{% elseif borg_backup_mode == 'check' %}
The backup archive seems to be corrupt. Please try to use a different intact backup archive or try to fix it by following <a href="https://borgbackup.readthedocs.io/en/stable/faq.html?highlight=repair#:~:text=repairing%20a%20damaged%20repository"><b>this documentation</b></a>
{% endif %}
{% elseif backup_exit_code == 0 %}
<span class="status success"></span> Last {{ borg_backup_mode }} successful! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
{% if borg_backup_mode == 'test' %}
Feel free to check the integrity of the backup archive below before starting the restore process in order to make double-sure that the restore will work. This can take a long time though depending on the size of the backup archive and is thus not required.<br><br>
<form method="POST" action="/api/docker/backup-check" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Check backup integrity"/><br/>
</form>
{% endif %}
Choose the backup that you want to restore and click on the button below to restore the selected backup. This will restore the whole AIO instance from backup. Please not that the current AIO password will be kept and the AIO password not restored from backup!<br><br>
<form method="POST" action="/api/docker/restore" class="xhr" id="restore_selection">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<select id="selected_restore_time" name="selected_restore_time" form="restore_selection">
{% for restore_time in backup_times %}
<option value="{{ restore_time }}">{{ restore_time }} UTC</option>
{% endfor %}
</select>
<input class="button" type="submit" value="Restore selected backup"/>
</form>
{% endif %}
{% elseif borg_backup_mode == 'restore' %}
{% if backup_exit_code > 0 %}
<span class="status error"></span> Last restore failed! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
Somehow the restore failed which is unexpected! Please adjust the path and password, test it and try to restore again!
{% endif %}
{% endif %}
{% endif %}
{% if borg_backup_host_location == '' or borg_restore_password == '' or borg_backup_mode not in ['test', 'check', ''] or backup_exit_code > 0 %}
Please enter the location of the backup archive on your host and the password of the backup archive below:<br><br>
<form method="POST" action="/api/configuration" class="xhr">
<input type="text" name="borg_restore_host_location" value="{{borg_backup_host_location}}" placeholder="/mnt/backup"/>
<input type="text" name="borg_restore_password" value="{{borg_restore_password}}" placeholder="enter the borg password"/>
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Submit" />
</form>
The folder path that you enter must start with <b>/</b> and must <b>not</b> end with <b>/</b>.<br><br>
An example for Linux is <b>/mnt/backup</b>.<br>
For macOS it may be <b>/var/backup</b>.<br>
On Windows it might be <b>/host_mnt/c/backup</b>. (This Windows example would be equivalent to 'C:\backup' on the Windows host. So you need to translate the path that you want to use into the correct format.)<br><br>
⚠ Note that the backup archive must be located in a subfolder of the folder that you enter here and the subfolder which contains the archive must be named 'borg'. Otherwise will the backup container not find the backup archive!<br><br>
{% endif %}
{% else %}
<b>Everything set!</b> Click on the button below to test the path and password:<br/><br/>
<form method="POST" action="/api/docker/backup-test" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Test path and password"/><br/>
</form>
{% endif %}
{% endif %}
{% endif %}
{% if domain != "" and was_start_button_clicked == true %}
You are running the <a href="https://github.com/nextcloud/all-in-one#how-to-switch-the-channel"><b>{{ current_channel }}</b></a> channel. (<a href="/api/docker/logs?id=nextcloud-aio-mastercontainer">Logs</a>)<br><br>
{% endif %}
{% if is_backup_container_running == true %}
<span class="status running"></span> Backup container is currently running. (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
<a href="" class="button reload">Reload ↻</a><br/><br>
{% endif %}
{% if domain != "" %}
{% if isAnyRunning == true %}
{% if isApacheStarting != true %}
Initial Nextcloud username: admin<br />
Initial Nextcloud password: {{ nextcloud_password }}<br /><br/>
{% if borg_backup_host_location != '' %}
<details>
<summary>Click here to reveal the initial Nextcloud credentials</summary><br />
{% endif %}
Initial Nextcloud username: <b>admin</b><br />
Initial Nextcloud password: <b>{{ nextcloud_password }}</b>
{% if borg_backup_host_location != '' %}
</details><br /><br />
{% else %}
<br><br>
{% endif %}
<a href="https://{{ domain }}" class="button" target="_blank" rel="noopener">Open your Nextcloud ↗</a><br/>
{% else %}
Containers are currently starting.<br /><br />
<a href="" class="button reload">Reload ↻</a><br/>
{% if isAnyRestarting == false %}
<span class="status running"></span> Containers are currently starting.<br /><br />
<a href="" class="button reload">Reload ↻</a><br/><br>
{% else %}
It seems like at least one container is currently restarting which means it is not able to start correctly.<br><br>
To break out this endless loop, you can stop the containers below and investigate the issue by having a look at the container logs before starting them again.<br><br>
<form method="POST" action="/api/docker/stop" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Stop containers" />
</form>
{% endif %}
{% endif %}
{% endif %}
@@ -81,7 +203,7 @@
<ul>
{# @var containers \AIO\Container\Container[] #}
{% for container in containers %}
{% if container.GetIdentifier() != 'nextcloud-aio-borgbackup' and container.GetIdentifier() != 'nextcloud-aio-watchtower' and container.GetIdentifier() != 'nextcloud-aio-domaincheck' %}
{% if container.GetIdentifier() not in ['nextcloud-aio-borgbackup', 'nextcloud-aio-watchtower', 'nextcloud-aio-domaincheck'] %}
<li>
{% if class(container.GetStartingState()) == 'AIO\\Container\\State\\StartingState' %}
<span class="status running"></span>
@@ -99,18 +221,28 @@
</ul>
{% if has_update_available == true %}
⚠ Container updates are available. Click on `Stop Containers` and `Start Containers` to update them. You should consider creating a backup first. The mastercontainer gets updated with a different procedure though and has its own update button which is visible if an update is available.<br><br>
{% if is_mastercontainer_update_available == false %}
⚠ Container updates are available. Click on 'Stop Containers' and 'Start Containers' to update them. You should consider creating a backup first.<br><br>
{% endif %}
{% else %}
{% if is_mastercontainer_update_available == false %}
Your containers are up-to-date.<br><br>
{% else %}
Your containers are up-to-date. (Except the mastercontainer. See the section below.)<br><br>
{% endif %}
{% endif %}
{% endif %}
{% if isAnyRunning == true %}
{% if isApacheStarting != true %}
{% if is_mastercontainer_update_available == true %}
⚠ A mastercontainer update is available. Please click on the button below to stop your containers in order to be able to update the mastercontainer.<br /><br />
{% if current_channel starts with 'latest' %}
You can find the changelog <a href="https://github.com/nextcloud/all-in-one/releases/latest"><b>here</b></a><br><br>
{% elseif current_channel starts with 'beta' %}
You can find the changelog <a href="https://github.com/nextcloud/all-in-one/releases"><b>here</b></a><br><br>
{% elseif current_channel starts with 'develop' %}
You can find all changes <a href="https://github.com/nextcloud-releases/all-in-one/commits/main"><b>here</b></a><br><br>
{% endif %}
{% endif %}
<form method="POST" action="/api/docker/stop" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
@@ -126,72 +258,78 @@
{% if was_start_button_clicked == false %}
Clicking on the button below will download all docker containers and start them. This can take a lot of time depending on your internect connection. Since the overall size is a few GB, this will take around 5-10 min or more. So be aware and patient!<br><br>
{% endif %}
{% if was_start_button_clicked == false or has_update_available == false %}
<form method="POST" action="/api/docker/start" class="xhr">
{% if is_mastercontainer_update_available == true %}
⚠ A mastercontainer update is available. Please click on the button below to update it.<br><br>
<form method="POST" action="/api/docker/watchtower" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Start containers" />
<input class="button" type="submit" value="Update mastercontainer" />
</form>
{% else %}
<form method="POST" action="/api/docker/start" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button " type="submit" value="Start and update containers" onclick="return confirm('Start and update containers? You should consider creating a backup first.')" />
</form>
{% if was_start_button_clicked == false or has_update_available == false %}
<form method="POST" action="/api/docker/start" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Start containers" />
</form>
{% else %}
<form method="POST" action="/api/docker/start" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button " type="submit" value="Start and update containers" onclick="return confirm('Start and update containers? You should consider creating a backup first.')" />
</form>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if is_mastercontainer_update_available == true %}
{% if isBackupOrRestoreRunning == false %}
<h2>Mastercontainer update</h2>
⚠ A mastercontainer update is available. Please click on the button below to update it. All other containers get updated independently from the mastercontainer by simply clicking on `Stop containers` and clicking on `Start containers` if a new update is available.<br><br>
<form method="POST" action="/api/docker/watchtower" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Update mastercontainer" />
</form>
{% endif %}
{% endif %}
{% if was_start_button_clicked == true %}
{% if isBackupOrRestoreRunning == false and borg_backup_host_location == "" and isApacheStarting != true %}
{% if is_backup_container_running == false and borg_backup_host_location == "" and isApacheStarting != true %}
<h2>Backup and restore</h2>
Please type in the directory where backups will get created on the host system:<br><br>
<form method="POST" action="/api/configuration" class="xhr">
<input type="text" name="borg_backup_host_location" value="/mnt/backup" placeholder="/mnt/backup"/>
<input type="text" name="borg_backup_host_location" placeholder="/mnt/backup"/>
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Submit" />
</form>
The folder path that you enter must start with <b>/mnt/</b> or <b>/media/</b> or be equal to <b>/var/backups</b>. So e.g. <b>/mnt/backup</b> or <b>/var/backups</b>
The folder path that you enter must start with <b>/</b> and must <b>not</b> end with <b>/</b>.<br><br>
An example for Linux is <b>/mnt/backup</b>.<br>
For macOS it may be <b>/var/backup</b>.<br>
On Windows it might be <b>/host_mnt/c/backup</b>. (This Windows example would be equivalent to 'C:\backup' on the Windows host. So you need to translate the path that you want to use into the correct format.)<br><br>
{% endif %}
{% if borg_backup_host_location != "" %}
<h2>Backup and restore</h2>
{% if isBackupContainerRunning == false %}
{% if is_backup_container_running == false %}
<h2>Backup and restore</h2>
{% if backup_exit_code > 0 %}
<span class="status error"></span> Last {{ borg_backup_mode }} failed! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
{% elseif backup_exit_code == 0 %}
{% if borg_backup_mode == "backup" %}
<span class="status success"></span> Last {{ borg_backup_mode }} successful on {{ last_backup_time }}! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
<span class="status success"></span> Last {{ borg_backup_mode }} successful on {{ last_backup_time }} UTC! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
{% else %}
<span class="status success"></span> Last {{ borg_backup_mode }} successful! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
{% endif %}
{% endif %}
{% endif %}
{% if isBackupContainerRunning == false %}
This is your encryption password for backups: {{ borgbackup_password }} <br /><br/>
{% if is_backup_container_running == false and isApacheStarting == false %}
{% if has_backup_run_once == true %}
<details>
<summary>Click here to reveal all backup options</summary><br />
{% endif %}
<h3>Backup information</h3>
This is your encryption password for backups: <b>{{ borgbackup_password }}</b><br /><br/>
Please save it at a safe place since you won't be able to restore from backup if you loose this password! <br /><br/>
Backed up will get all important data of your Nextcloud AIO instance like the database, your files and configuration files of the mastercontainer and else. <br /><br/>
The backup itself will use a tool that is called <a href="https://github.com/borgbackup/borg#what-is-borgbackup">BorgBackup<a/> which is a well-known server backup tool that efficiently backs up your files and encrypts them on the fly. <br /><br/>
Backups get created in the following directory on the host: {{ borg_backup_host_location }}/borg <br /><br/>
The backup itself will use a tool that is called <a href="https://github.com/borgbackup/borg#what-is-borgbackup"><b>BorgBackup</b><a/> which is a well-known server backup tool that efficiently backs up your files and encrypts them on the fly. <br /><br/>
Backups get created in the following directory on the host: <b>{{ borg_backup_host_location }}/borg</b> <br /><br/>
Be aware that this solution does not back up files and folders that are mounted into Nextcloud using the external storage app.
{% if isApacheStarting != true %}
<h3>Backup creation</h3>
Clicking on the button below will create a backup.<br><br/>
<form method="POST" action="/api/docker/backup" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
@@ -199,6 +337,7 @@
</form>
{% if has_backup_run_once == true %}
<h3>Backup check</h3>
Click on the button below to perform a backup integrity check. This is an option that verifies that your backup is intact but it should't be needed in most situtations.<br><br/>
<form method="POST" action="/api/docker/backup-check" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
@@ -206,40 +345,112 @@
<input class="button" type="submit" value="Check backup integrity" onclick="return confirm('Check backup integrity? Are you sure that you want to check the backup? This can take a long time depending on the size of your backup.')" /><br/>
</form>
Click on the button below to restore the last backup from {{ last_backup_time }}. This will overwrite all your files with the state of the backup. It makes sense to run an integrity check before restoring your files but is not mandatory since it shouldn't be needed in most situations.<br><br>
<form method="POST" action="/api/docker/restore" class="xhr">
<h3>Backup restore</h3>
Choose the backup that you want to restore and click on the button below to restore the selected backup. This will overwrite all your files with the state of the backup so you should consider creating a backup first. It also makes sense to run an integrity check before restoring your files but is not mandatory since it shouldn't be needed in most situations.<br><br>
<form method="POST" action="/api/docker/restore" class="xhr" id="restore_selection">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Restore last backup" onclick="return confirm('Restore last backup? Are you sure that you want to restore the last backup? This will stop all running containers and restore the last backup from {{ last_backup_time }}. You might want to check the backup integrity first.')" />
<select id="selected_restore_time" name="selected_restore_time" form="restore_selection">
{% for restore_time in backup_times %}
<option value="{{ restore_time }}">{{ restore_time }} UTC</option>
{% endfor %}
</select>
<input class="button" type="submit" value="Restore selected backup" onclick="return confirm('Restore the selected backup? Are you sure that you want to restore the selected backup? This will stop all running containers and restore the selected backup. It is recommended to create a backup first. You might also want to check the backup integrity.')" />
</form>
<h3>Daily backup</h3>
{% if daily_backup_time == "" %}
By entering a time below, you can enable daily backups. It will create them at the entered time in 24h format. E.g. <b>04:00</b> will create backups at 4 am UTC and <b>16:00</b> at 4 pm UTC.<br><br/>
<form method="POST" action="/api/configuration" class="xhr">
<input type="text" name="daily_backup_time" value="04:00" placeholder="04:00"/>
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Submit" />
</form>
This option will also automatically update your containers, the mastercontainer and your Nextcloud apps and will send a notification about the result of the backup.<br><br/>
{% else %}
Daily backups will be created at <b>{{ daily_backup_time }} UTC</b> which includes a notification about the result of the backup and automatic updates of your containers, the mastercontainer and your Nextcloud apps. You can disable this option again by clicking on the button below.<br><br/>
<form method="POST" action="/api/configuration" class="xhr">
<input type="hidden" name="delete_daily_backup_time" value="yes"/>
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Disable daily backups" />
</form>
{% endif %}
{% endif %}
{% endif %}
{% else %}
<span class="status running"></span> Backup container currently running. (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
<a href="" class="button reload">Reload ↻</a><br/>
{% if has_backup_run_once == false %}
<br /><br />
{% else %}
</details><br /><br />
{% endif %}
{% endif %}
{% endif %}
{% if is_backup_container_running == false %}
{% if isApacheStarting == false %}
<h2>AIO password change</h2>
You can change your AIO password below:<br><br />
<form method="POST" action="/api/configuration" class="xhr">
<input type="text" autocomplete="current-password" name="current-master-password" placeholder="Your current AIO password"/>
<input type="text" autocomplete="new-password" name="new-master-password" placeholder="Your new AIO password"/>
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Submit" />
</form>
The new password needs to be at least 24 characters long. Allowed characters are the <a href="https://en.wikipedia.org/wiki/Latin_alphabet#/media/File:Abecedarium.png"><b>latin characters</b></a> <b>a-z</b>, <b>A-Z</b>, <b>0-9</b> and <b>spaces</b>.
{% endif %}
{% endif %}
{% endif %}
{% if is_backup_container_running == false %}
<h2>Optional addons</h2>
In this section you can enable or disable optional addons.<br><br>
{% if isAnyRunning == true %}
<b>Note:</b> You can enable or disable them when your containers are stopped.<br><br>
{% endif %}
<form id="options-form" method="POST" action="/api/configuration" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="hidden" name="options-form" value="options-form">
{% if is_clamav_enabled == true %}
<input type="checkbox" id="clamav" name="clamav" checked="checked"><label for="clamav">ClamAV (only supported on x64, needs ~1GB additional RAM)</label><br>
{% else %}
<input type="checkbox" id="clamav" name="clamav"><label for="clamav">ClamAV (only supported on x64, needs ~1GB additional RAM)</label><br>
{% endif %}
{% if is_collabora_enabled == true %}
<input type="checkbox" id="collabora" name="collabora" checked="checked"><label for="collabora">Collabora (Nextcloud Office)</label><br>
{% else %}
<input type="checkbox" id="collabora" name="collabora"><label for="collabora">Collabora (Nextcloud Office)</label><br>
{% endif %}
{% if is_talk_enabled == true %}
<input type="checkbox" id="talk" name="talk" checked="checked"><label for="talk">Nextcloud Talk (needs ports 3478/TCP and 3478/UDP open in your firewall/router)</label><br><br>
{% else %}
<input type="checkbox" id="talk" name="talk"><label for="talk">Nextcloud Talk (needs ports 3478/TCP and 3478/UDP open in your firewall/router)</label><br><br>
{% endif %}
{% if is_onlyoffice_enabled == true %}
<input type="checkbox" id="onlyoffice" name="onlyoffice" checked="checked"><label for="onlyoffice">OnlyOffice (only supported on x64)</label><br>
{% else %}
<input type="checkbox" id="onlyoffice" name="onlyoffice"><label for="onlyoffice">OnlyOffice (only supported on x64)</label><br>
{% endif %}
<input id="options-form-submit" class="button" type="submit" value="Save changes" />
</form>
<b>System requirements:</b> When any optional addon is enabled, at least 2GB RAM, a dual-core CPU and 40GB system storage are required. When enabling ClamAV, at least 3GB RAM are required.<br><br>
{% if isAnyRunning == true or is_x64_platform == false %}
<script type="text/javascript" src="disable-clamav.js"></script>
<script type="text/javascript" src="disable-onlyoffice.js"></script>
{% endif %}
{% if isAnyRunning == true %}
<script type="text/javascript" src="disable-talk.js"></script>
<script type="text/javascript" src="disable-collabora.js"></script>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if isApacheStarting == true or isBackupContainerRunning == true or isWatchtowerRunning == true %}
<script>
if (document.hasFocus()) {
// hide reload button if the site reloads automatically
var list = document.getElementsByClassName("reload button");
for (var i = 0; i < list.length; i++) {
// list[i] is a node with the desired class name
list[i].style.display = 'none';
}
// set timeout for reload
setTimeout(function(){
window.location.reload(1);
}, 5000);
}
</script>
{% if isApacheStarting == true or is_backup_container_running == true or isWatchtowerRunning == true or is_daily_backup_running == true %}
<script type="text/javascript" src="automatic_reload.js"></script>
{% else %}
<script type="text/javascript" src="before-unload.js"></script>
{% endif %}
</div>

View File

@@ -4,6 +4,7 @@
<link rel="stylesheet" href="/style.css" media="all" />
<link rel="icon" href="/img/favicon.png">
<script type="text/javascript" src="forms.js"></script>
<script type="text/javascript" src="options-form-submit.js"></script>
</head>
<body>

View File

@@ -1,23 +1,23 @@
{% extends "layout.twig" %}
{% block body %}
<div class="login-wrapper">
<div class="login">
<img src="/img/logo-blue.svg" style="margin-left: auto;margin-right: auto;display: block;">
<h1>Nextcloud AIO Login</h1>
{% if is_login_allowed == true %}
<p>Log in using your Nextcloud AIO password.</p>
<form method="POST" action="/api/auth/login">
<input type="text" name="password" placeholder="Password" />
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="submit" class="button" value="Login" />
</form>
{% else %}
<p>The login is blocked since Nextcloud is running. Please use the automatic login from your Nextcloud.<br><br>
You can unblock the login by running 'sudo docker stop nextcloud-aio-apache'.</p>
{% endif %}
</div>
</div>
{% endblock %}
{% extends "layout.twig" %}
{% block body %}
<div class="login-wrapper">
<div class="login">
<img src="/img/logo-blue.svg" style="margin-left: auto;margin-right: auto;display: block;">
<h1>Nextcloud AIO Login</h1>
{% if is_login_allowed == true %}
<p>Log in using your Nextcloud AIO password:</p>
<form method="POST" action="/api/auth/login">
<input type="text" autocomplete="off" name="password" placeholder="Password" />
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="submit" class="button" value="Login" />
</form>
{% else %}
<p>The login is blocked since Nextcloud is running. Please use the automatic login from your Nextcloud.<br><br>
You can unblock the login by running 'sudo docker stop nextcloud-aio-apache'.</p>
{% endif %}
</div>
</div>
{% endblock %}

View File

@@ -4,9 +4,9 @@
<div class="login-wrapper">
<div class="login">
<img src="/img/logo-blue.svg" style="margin-left: auto;margin-right: auto;display: block;">
<h1>Your password for Nextcloud AIO Beta</h1>
<p>Please note down the password to access the AIO interface and don't loose it!</p>
<h1>Nextcloud AIO setup</h1>
<p>Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.</p>
<p>Please note down the password to access the AIO interface and don't loose it!</p>
<strong>Password</strong><br/> <span class="monospace">{{ password }}</span><br>
<a href="/" class="button" target="_blank" rel="noopener">Open Nextcloud AIO login ↗</a>
</div>

281
readme.md
View File

@@ -1,8 +1,4 @@
# Nextcloud All In One Beta
This is beta software and not production ready.
But feel free to use it at your own risk!
We expect there to be rough edges and potentially serious bugs.
# Nextcloud All In One
Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.
Included are:
@@ -11,30 +7,18 @@ Included are:
- High performance backend for Nextcloud Files
- High performance backend for Nextcloud Talk
- Backup solution (based on [BorgBackup](https://github.com/borgbackup/borg#what-is-borgbackup))
**Found a bug?** Please file an issue at https://github.com/nextcloud/all-in-one
- OnlyOffice
- ClamAV
## How to use this?
The following instructions are especially meant for Linux. For macOS see [this](#how-to-run-it-on-macos), for Windows see [this](#how-to-run-it-on-windows).
1. Install Docker on your Linux installation using:
```
curl -fsSL get.docker.com | sudo sh
```
2. Make sure to pull the latest image:
```
# For x64 CPUs:
sudo docker pull nextcloud/all-in-one:latest
```
<details>
<summary>Command for arm64 CPUs like the Raspberry Pi 4</summary>
```
# For arm64 CPUs:
sudo docker pull nextcloud/all-in-one:latest-arm64
```
</details>
3. Run the following command in order to start the container:
2. Run the following command in order to start the container:<br>
(For people that cannot use ports 80 and/or 443 on this server, please follow [this documentation](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md). Otherwise please run the command below!)
```
# For x64 CPUs:
sudo docker run -it \
@@ -65,30 +49,54 @@ Included are:
</details>
4. After the initial startup, you should be able to open the Nextcloud AIO Interface now on port 8080 of this server.<br>
E.g. https://internal.ip.of.this.server:8080<br>
If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatially by opening the Nextcloud AIO Interface via:<br>
https://your-domain-that-points-to-this-server.tld:8443
3. After the initial startup, you should be able to open the Nextcloud AIO Interface now on port 8080 of this server.<br>
E.g. `https://ip.address.of.this.server:8080`<br>
If your firewall/router has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatially by opening the Nextcloud AIO Interface via:<br>
`https://your-domain-that-points-to-this-server.tld:8443`
4. Please do not forget to open port `3478/TCP` and `3478/UDP` in your firewall/router for the Talk container!
## FAQ
### How does it work?
Nextcloud AIO is inspired by projects like Portainer that allow to manage the docker daemon by talking to the docker socket directly. This concept allows to install only one container with a single command that does the heavy lifting of creating and managing all containers that are needed in order to provide a Nextcloud installation with most features included. It also makes updating a breeze and is not bound to the host system (and its slow updates) anymore as everything is in containers. Additionally, it is very easy to handle from a user perspective because a simple interface for managing your Nextcloud AIO installation is provided.
Nextcloud AIO is inspired by projects like Portainer that manage the docker daemon by talking to it through the docker socket directly. This concept allows a user to install only one container with a single command that does the heavy lifting of creating and managing all containers that are needed in order to provide a Nextcloud installation with most features included. It also makes updating a breeze and is not bound to the host system (and its slow updates) anymore as everything is in containers. Additionally, it is very easy to handle from a user perspective because a simple interface for managing your Nextcloud AIO installation is provided.
### Are reverse proxies supported?
Reverse proxies are currently because of the above mentioned architecture not supported.<br>
You might investigate yourself though how it could made work behind reverse proxies. If you open a PR with that we might consider it then :)
Yes. Please refer to the following documentation on this: [reverse-proxy.md](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md)
### Which ports are mandatory to be open?
### Which ports are mandatory to be open in your firewall/router?
Only those (if you acces the Mastercontainer Interface internally via port 8080):
- `443/TCP` for the Nextcloud container
- `3478/TCP` and `3478/UPD` for the Talk container
- `443/TCP` for the Apache container
- `3478/TCP` and `3478/UDP` for the Talk container
### Explanation of used ports:
- `8080/TCP`: Mastercontainer Interface with self-signed certificate (works always, also if only access via IP-address is possible, e.g. `https://internal.ip.address:8080/`)
- `8080/TCP`: Mastercontainer Interface with self-signed certificate (works always, also if only access via IP-address is possible, e.g. `https://ip.address.of.this.server:8080/`)
- `80/TCP`: redirects to Nextcloud (is used for getting the certificate via ACME http-challenge for the Mastercontainer)
- `8443/TCP`: Mastercontainer Interface with valid certificate (only works if port 80 and 8443 are open and you point a domain to your server. It generates a valid certificate then automatically and access via e.g. `https://public.domain.com:8443/` is possible.)
- `443/TCP`: will be used by the Nextcloud container later on and needs to be open
- `3478/TCP` and `3478/UPD`: will be used by the Turnserver inside the Talk container and needs to be open
- `8443/TCP`: Mastercontainer Interface with valid certificate (only works if port 80 and 8443 are open in your firewall/router and you point a domain to your server. It generates a valid certificate then automatically and access via e.g. `https://public.domain.com:8443/` is possible.)
- `443/TCP`: will be used by the Apache container later on and needs to be open in your firewall/router
- `3478/TCP` and `3478/UDP`: will be used by the Turnserver inside the Talk container and needs to be open in your firewall/router
### How to run it on macOS?
On macOS, there is one specialty in comparison to Linux: instead of using `--volume /var/run/docker.sock:/var/run/docker.sock:ro`, you need to use `--volume /var/run/docker.sock.raw:/var/run/docker.sock:ro` to run it after you installed [Docker Desktop](https://www.docker.com/products/docker-desktop/). Apart from that it should work and behave the same like on Linux.
### How to run it on Windows?
On Windows, the following command should work after you installed [Docker Desktop](https://www.docker.com/products/docker-desktop/):
<details>
<summary>Click here to show it</summary>
```
docker run -it ^
--name nextcloud-aio-mastercontainer ^
--restart always ^
-p 80:80 ^
-p 8080:8080 ^
-p 8443:8443 ^
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config ^
--volume //var/run/docker.sock:/var/run/docker.sock:ro ^
nextcloud/all-in-one:latest
```
**Please note:** AIO works on Windows in general but due to a bug in `Docker for Windows`, it currently does not support mounting directories from the host into AIO which means that `NEXTCLOUD_DATADIR`, `NEXTCLOUD_MOUNT` do not work and the built-in backup solution is not able to write to the host OS. See https://github.com/nextcloud/all-in-one/discussions/600.
</details>
### How to run `occ` commands?
Simply run the following: `sudo docker exec -it nextcloud-aio-nextcloud php occ your-command`. Of course `your-command` needs to be exchanged with the command that you want to run.
@@ -96,6 +104,12 @@ Simply run the following: `sudo docker exec -it nextcloud-aio-nextcloud php occ
### How to resolve `Security & setup warnings displays the "missing default phone region" after initial install`?
Simply run the following command: `sudo docker exec -it nextcloud-aio-nextcloud php occ config:system:set default_phone_region --value="yourvalue"`. Of course you need to modify `yourvalue` based on your location. Examples are `DE`, `EN` and `GB`. See this list for more codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
### Update policy
This project values stability over new features. That means that when a new major Nextcloud update gets introduced, we will wait at least until the first patch release, e.g. `24.0.1` is out before upgrading to it. Also we will wait with the upgrade until all important apps are compatible with the new major version. Minor or patch releases for Nextcloud and all dependencies as well as all containers will be updated to new versions as soon as possible but we try to give all updates first a good test round before pushing them. That means that it can take around 2 weeks before new updates reach the `latest` channel. If you want to help testing, you can switch to the `beta` channel by following [this documentation](#how-to-switch-the-channel) which will also give you the updates earlier.
### How to switch the channel?
You can switch to a different channel like e.g. the beta channel or from the beta channel back to the latest channel by stopping the mastercontainer, removing it (no data will be lost) and recreating the container using the same command that you used initially to create the mastercontainer. For the beta channel on x64 you need to change the last line `nextcloud/all-in-one:latest` to `nextcloud/all-in-one:beta` and vice versa. For arm64 it is `nextcloud/all-in-one:latest-arm64` and `nextcloud/all-in-one:beta-arm64`, respectively.
### How to update the containers?
If we push new containers to `latest`, you will see in the AIO interface below the `containers` section that new container updates were found. In this case, just press `Stop containers` and `Start containers` in order to update the containers. The mastercontainer has its own update procedure though. See below. And don't forget to back up the current state of your instance using the built-in backup solution before starting the containers again! Otherwise you won't be able to restore your instance easily if something should break during the update.
@@ -104,20 +118,204 @@ If a new `Mastercontainer` update was found, you'll see an additional section be
Additionally, there is a cronjob that runs once a day that checks for container and mastercontainer updates and sends a notification to all Nextcloud admins if a new update was found.
### How to easily log in to the AIO interface?
If your Nextcloud is running and you are logged in as admin in your Nextcloud, you can easily log in to the AIO interface by opening `https://yourdomain.tld/settings/admin/overview` which will show a button on top that enables you to log in to the AIO interface by just clicking on this button.
If your Nextcloud is running and you are logged in as admin in your Nextcloud, you can easily log in to the AIO interface by opening `https://yourdomain.tld/settings/admin/overview` which will show a button on top that enables you to log in to the AIO interface by just clicking on this button. **Note:** You can change the domain/ip-address/port of the button by simply stopping the containers, visiting the AIO interface from the correct and desired domain/ip-address/port and clicking once on `Start containers`.
### Backup solution
Nextcloud AIO provides a local backup solution based on BorgBackup. These backups act as a local restore point in case the installation gets corrupted.
Nextcloud AIO provides a local backup solution based on [BorgBackup](https://github.com/borgbackup/borg#what-is-borgbackup). These backups act as a local restore point in case the installation gets corrupted.
It is recommended to create a backup before any container update. By doing this, you will be safe regarding any possible complication during updates because you will be able to restore the whole instance with basically one click.
If you connect an external drive to your host, and choose the backup directory to be on that drive, you are also kind of save against drive failures of the drive where the docker volumes are stored on.
Backups can be created and restored in the AIO interface using the buttons `Create Backup` and `Restore last backup`. Additionally, a backup check is provided that checks the integrity of your backups but it shouldn't be needed in most situations.
<details>
<summary>How to do the above step for step</summary>
<br>
1. Mount an external/backup HDD to the host OS using the built-in functionality or udev rules or whatever way you prefer. (E.g. follow this video: https://www.youtube.com/watch?v=2lSyX4D3v_s) and mount the drive in best case in `/mnt/backup`.
2. If not already done, fire up the docker container and set up Nextcloud as per the guide.
3. Now open the AIO interface.
4. Under backup section, add your external disk mountpoint as backup directory, e.g. `/mnt/backup`.
5. Click on `Create Backup` which should create the first backup on the external disk.
</details>
Backups can be created and restored in the AIO interface using the buttons `Create Backup` and `Restore selected backup`. Additionally, a backup check is provided that checks the integrity of your backups but it shouldn't be needed in most situations.
The backups itself get encrypted with an encryption key that gets shown to you in the AIO interface. Please save that at a safe place as you will not be able to restore from backup without this key.
Note that this implementation does not provide remote backups, for this you can use the [backup app](https://apps.nextcloud.com/apps/backup).
Be aware that this solution does not back up files and folders that are mounted into Nextcloud using the external storage app.
Note that this implementation does not provide remote backups, for this you can use the [backup app](https://apps.nextcloud.com/apps/backup).
---
#### Failure of the backup container in LXC containers
If you are running AIO in a LXC container, you need to make sure that FUSE is enabled in the LXC container settings. Otherwise the backup container will not be able to start as FUSE is required for it to work.
---
#### Pro-tip: Backup archives access
You can open the BorgBackup archives on your host by following these steps:<br>
(instructions for Ubuntu Desktop)
```bash
# Install borgbackup on the host
sudo apt update && sudo apt install borgbackup
# Mount the archives to /tmp/borg (if you are using the default backup location /mnt/backup/borg)
sudo mkdir -p /tmp/borg && sudo borg mount "/mnt/backup/borg" /tmp/borg
# After entering your repository key successfully, you should be able to access all archives in /tmp/borg
# You can now do whatever you want by syncing them to a different place using rsync or doing other things
# E.g. you can open the file manager on that location by running:
xhost +si:localuser:root && sudo nautilus /tmp/borg
# When you are done, simply close the file manager and run the following command to unmount the backup archives:
sudo umount /tmp/borg
```
---
#### Delete backup archives manually
You can delete BorgBackup archives on your host manually by following these steps:<br>
(instructions for Debian based OS' like Ubuntu)
```bash
# Install borgbackup on the host
sudo apt update && sudo apt install borgbackup
# List all archives (if you are using the default backup location /mnt/backup/borg)
sudo borg list "/mnt/backup/borg"
# After entering your repository key successfully, you should now see a list of all backup archives
# An example backup archive might be called 20220223_174237-nextcloud-aio
# Then you can simply delete the archive with:
sudo borg delete --stats --progress "/mnt/backup/borg::20220223_174237-nextcloud-aio"
```
After doing so, make sure to update the backup archives list in the AIO interface!<br>
You can do so by clicking on the `Check backup integrity` button or `Create backup` button.
---
#### Sync the backup regularly to another drive
For increased backup security, you might consider syncing the backup repository regularly to another drive.
To do that, first add the drive to `/etc/fstab` so that it is able to get automatically mounted and then create a script that does all the things automatically. Here is an example for such a script:
<details>
<summary>Click here to expand</summary>
```bash
#!/bin/bash
# Please modify all variables below to your needings:
SOURCE_DIRECTORY="/mnt/backup/borg"
DRIVE_MOUNTPOINT="/mnt/backup-drive"
TARGET_DIRECTORY="/mnt/backup-drive/borg"
########################################
# Please do NOT modify anything below! #
########################################
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit 1
fi
if ! [ -d "$SOURCE_DIRECTORY" ]; then
echo "The source directory does not exist."
exit 1
fi
if [ -z "$(ls -A "$SOURCE_DIRECTORY/")" ]; then
echo "The source directory is empty which is not allowed."
exit 1
fi
if ! [ -d "$DRIVE_MOUNTPOINT" ]; then
echo "The drive mountpoint must be an existing directory"
exit 1
fi
if ! grep -q " $DRIVE_MOUNTPOINT " /etc/fstab; then
echo "Could not find the drive mountpoint in the fstab file. Did you add it there?"
exit 1
fi
if ! mountpoint -q "$DRIVE_MOUNTPOINT"; then
mount "$DRIVE_MOUNTPOINT"
if ! mountpoint -q "$DRIVE_MOUNTPOINT"; then
echo "Could not mount the drive. Is it connected?"
exit 1
fi
fi
if [ -f "$SOURCE_DIRECTORY/lock.roster" ]; then
echo "Cannot run the script as the backup archive is currently changed. Please try again later."
exit 1
fi
mkdir -p "$TARGET_DIRECTORY"
if ! [ -d "$TARGET_DIRECTORY" ]; then
echo "Could not create target directory"
exit 1
fi
if ! rsync --stats --archive --human-readable --delete "$SOURCE_DIRECTORY/" "$TARGET_DIRECTORY"; then
echo "Failed to sync the backup repository to the target directory."
exit 1
fi
umount "$DRIVE_MOUNTPOINT"
if docker ps --format "{{.Names}}" | grep "^nextcloud-aio-nextcloud$"; then
docker exec -it nextcloud-aio-nextcloud bash /notify.sh "Rsync backup successful!" "Synced the backup repository successfully."
else
echo "Synced the backup repository successfully."
fi
```
</details>
You can simply copy and past the script into a file e.g. named `backup-script.sh` e.g. here: `/root/backup-script.sh`. Do not forget to modify the variables to your needings though!
Afterwards apply the correct permissions with `sudo chown root:root /root/backup-script.sh` and `sudo chmod 700 /root/backup-script.sh`. Then you can create a cronjob that runs e.g. at `20:00` each week on sundays like this:
1. Open the cronjob with `sudo crontab -u root -e` (and choose your editor of choice if not already done. I'd recommend nano).
1. Add the following new line to the crontab if not alreaddy present: `0 20 * * 7 /root/backup-script.sh` which will run the script at 20:00 on sundays each week.
1. save and close the crontab (when using nano are the shortcouts for this `Ctrl + o` -> `Enter` and close the editor with `Ctrl + x`).
⚠ **Attention:** Make sure that the execution of the script does not collidate with the daily backups from AIO (if configured) since the target backup repository might get into an inconsistent state. (There is no check in place that checks this.)
### How to change the default location of Nextcloud's Datadir?
You can configure the Nextcloud container to use a specific directory on your host as data directory. You can do so by adding the environmental variable `NEXTCLOUD_DATADIR` to the initial startup of the mastercontainer. Allowed values for that variable are strings that start with `/` and are not equal to `/`.
- An example for Linux is `-e NEXTCLOUD_DATADIR="/mnt/ncdata"`.
- On macOS it might be `-e NEXTCLOUD_DATADIR="/var/nextcloud-data"`
- For Synology it may be `/volume1/docker/nextcloud/data`.
- On Windows it might be `-e NEXTCLOUD_DATADIR="/host_mnt/c/your/data/path"` (This Windows example would be equivalent to `C:\your\data\path` on the Windows host. So you need to translate the path that you want to use into the correct format.)
⚠ Please make sure to apply the correct permissions to the chosen directory before starting Nextcloud the first time (not needed on Windows).
- In this example for Linux, the command for this would be `sudo chown -R 33:0 /mnt/ncdata`.
- On macOS, the command for this would be `sudo chown -R 33:0 /var/nextcloud-data`.
- For Synology, the command for this example would be `sudo chown -R 33:0 /volume1/docker/nextcloud/data`
- On Windows, this command is not needed.
⚠ **Attention:** It is very important to change the datadir **before** Nextcloud is installed/started the first time and not to change it afterwards!
### How to allow the Nextcloud container to access directories on the host?
By default, the Nextcloud container is confined and cannot access directories on the host OS. You might want to change this when you are planning to use local external storage in Nextcloud to store some files outside the data directory and can do so by adding the environmental variable `NEXTCLOUD_MOUNT` to the initial startup of the mastercontainer. Allowed values for that variable are strings that start with `/` and are not equal to `/`.
- Two examples for Linux are `-e NEXTCLOUD_MOUNT="/mnt/"` and `-e NEXTCLOUD_MOUNT="/media/"`.
- For Synology it may be `/volume1/`.
- On Windows it might be `-e NEXTCLOUD_MOUNT="/host_mnt/c"` (This Windows example would be equivalent to `C:\` on the Windows host. So you need to translate the path that you want to use into the correct format.)
After using this option, please make sure to apply the correct permissions to the directories that you want to use in Nextcloud (not needed on Windows). E.g. `sudo chown -R 33:0 /mnt/your-drive-mountpoint` should make it work on Linux when you have used `-e NEXTCLOUD_MOUNT="/mnt/"`.
You can then navigate to the apps management page, activate the external storage app, navigate to `https://your-nc-domain.com/settings/admin/externalstorages` and add a local external storage directory that will be accessible inside the container at the same place that you've entered. E.g. `/mnt/your-drive-mountpoint` will be mounted to `/mnt/your-drive-mountpoint` inside the container, etc.
Be aware though that these locations will not be covered by the built-in backup solution!
### Huge docker logs
When your containers run for a few days without a restart, the container logs that you can view from the AIO interface can get really huge. You can limit the loge sizes by enabling logrotate for docker container logs. Feel free to enable this by following those instructions: https://sandro-keil.de/blog/logrotate-for-docker-container/
@@ -134,6 +332,9 @@ You can move the whole docker library and all its files including all Nextcloud
### How to edit Nextclouds config.php file with a texteditor?
You can edit Nextclouds config.php file directly from the host with your favorite text editor. E.g. like this: `sudo nano /var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/config/config.php`. Make sure to not break the file though which might corrupt your Nextcloud instance otherwise. In best case, create a backup using the built-in backup solution before editing the file.
### Custom skeleton directory
If you want to define a custom skeleton directory, you can do so by putting your skeleton files into `/var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/skeleton/`, applying the correct permissions with `sudo chown -R 33:0 /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/skeleton` and setting the skeleton directory option with `sudo docker exec -it nextcloud-aio-nextcloud php occ config:system:set skeletondirectory --value="/mnt/ncdata/skeleton"`. You can read further on this option here: [click here](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/config_sample_php_parameters.html?highlight=skeletondir#:~:text=adding%20%3Fdirect%3D1-,'skeletondirectory',-%3D%3E%20'%2Fpath%2Fto%2Fnextcloud)
### LDAP
It is possible to connect to an existing LDAP server. You need to make sure that the LDAP server is reachable from the Nextcloud container. Then you can enable the LDAP app and configure LDAP in Nextcloud manually. If you don't have a LDAP server yet, recommended is to use this docker container: https://hub.docker.com/r/osixia/openldap/. Make sure here as well that Nextcloud can talk to the LDAP server. The easiest way is by adding the LDAP docker container to the docker network `nextcloud-aio`. Then you can connect to the LDAP container by its name from the Nextcloud container. **Pro-tip**: You will probably find this app useful: https://apps.nextcloud.com/apps/ldap_write_support

226
reverse-proxy.md Normal file
View File

@@ -0,0 +1,226 @@
## Reverse Proxy Documentation
**Please note:** Publishing the AIO interface with a valid certificate to the public internet is **not** the goal of this documentation! Instead, the main goal is to publish Nextcloud with a valid certificate to the public internet which is **not** running inside the mastercontainer but in a different container! If you need a valid certificate for the AIO interface, see [point 3](#3-optional-get-a-valid-certificate-for-the-aio-interface).
In order to run Nextcloud behind a reverse proxy, you need to specify the port that the Apache container shall use, add a specific config to your reverse proxy and modify the startup command a bit. All examples below will use port `11000` as example Apache port which will be exposed on the host. Modify it to your needings.
**Attention** The process to run Nextcloud behind a reverse proxy consists of at least these 2 steps:
1. **Configure the reverse proxy! See [point 1](#1-add-this-to-your-reverse-proxy-config)**
1. **Use the in this document provided startup command! See [point 2](#2-use-this-startup-command)**
- Optional: get a valid certificate for the AIO interface! See [point 3](#3-optional-get-a-valid-certificate-for-the-aio-interface)
- How to debug things? See [point 4](#4-how-to-debug-things)
### 1. Add this to your reverse proxy config
**Please note:** Since the Apache container gets spawned by the mastercontainer, there is **NO** way to provide custom docker labels or custom environmental variables for the Apache container. So please do not attempt to do this because you will fail! Only the documented way will work!
#### Caddy
<details>
<summary>click here to expand</summary>
Add this to your Caddyfile:
```
https://<your-nc-domain>:443 {
header Strict-Transport-Security max-age=31536000;
reverse_proxy localhost:11000
}
```
Of course you need to modify `<your-nc-domain>` to the domain on which you want to run Nextcloud. **Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` when starting the reverse proxy container in order to connect the reverse proxy container to the host network. If that is not an option for you, you can alternatively instead of `locahost` use the ip-address that is displayed after running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (the command only works on Linux)
</details>
#### Nginx
<details>
<summary>click here to expand</summary>
**Disclaimer:** the config below is not working 100% correctly, yet. See e.g. https://github.com/nextcloud/all-in-one/issues/450, https://github.com/nextcloud/all-in-one/issues/447 and https://github.com/nextcloud/all-in-one/issues/491. Improvements to it are very welcome!
Add this to you nginx config:
```
location / {
proxy_pass http://localhost:11000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 0;
# Websocket
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
```
Of course you need to modify `<your-nc-domain>` to the domain on which you want to run Nextcloud. **Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` when starting the reverse proxy container in order to connect the reverse proxy container to the host network. If that is not an option for you, you can alternatively instead of `locahost` use the ip-address that is displayed after running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (the command only works on Linux)
</details>
#### Nginx-Proxy
<details>
<summary>click here to expand</summary>
Unfortunately it is not possible to configure nginx-proxy in a way that works because it completely relies on environmental variables of the docker containers itself. Providing these variables does not work as stated above.
If you really want to use AIO, we recommend you to switch to caddy. It is simply amazing!<br>
Of course understandable if that is not possible for you.
Apart from that, there is this idea: https://github.com/nextcloud/all-in-one/issues/557<br>
Pull requests are very welcome!
</details>
#### Traefik 2
<details>
<summary>click here to expand</summary>
**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!
1. Add a `nextcloud.toml` to the Treafik rules folder with the following content:
```toml
[http.routers]
[http.routers.nc-rtr]
entryPoints = ["https"]
rule = "Host(<your-nc-domain>)"
service = "nc-svc"
middlewares = ["chain-no-auth"]
[http.routers.nc-rtr.tls]
certresolver = "le"
[http.services]
[http.services.nc-svc]
[http.services.nc-svc.loadBalancer]
passHostHeader = true
[[http.services.nc-svc.loadBalancer.servers]]
url = "http://locahost:11000"
```
2. Add to the bottom of the `middlewares.toml` file in the Treafik rules folder the following content:
```toml
[http.middlewares.nc-middlewares-secure-headers]
[http.middlewares.nc-middlewares-secure-headers.headers]
hostsProxyHeaders = ["X-Forwarded-Host"]
sslRedirect = true
stsSeconds = 63072000
stsIncludeSubdomains = true
stsPreload = true
forceSTSHeader = true
referrerPolicy = "same-origin"
X-Robots-Tag = "none"
```
3. Add to the bottom of the `middleware-chains.toml` file in the Traefik rules folder the following content:
```toml
[http.middlewares.chain-nc]
[http.middlewares.chain-nc.chain]
middlewares = [ "middlewares-rate-limit", "nc-middlewares-secure-headers"]
```
---
Of course you need to modify `<your-nc-domain>` in the nextcloud.toml to the domain on which you want to run Nextcloud. **Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` when starting the reverse proxy container in order to connect the reverse proxy container to the host network. If that is not an option for you, you can alternatively instead of `locahost` use the ip-address that is displayed after running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (the command only works on Linux)
</details>
### 2. Use this startup command
After adjusting your reverse proxy config, use the following command to start AIO:<br>
(For an docker-compose example, see the example further [below](#inspiration-for-a-docker-compose-file).)
```
# For x64 CPUs:
sudo docker run -it \
--name nextcloud-aio-mastercontainer \
--restart always \
-p 8080:8080 \
-e APACHE_PORT=11000 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest
```
<details>
<summary>Command for arm64 CPUs like the Raspberry Pi 4</summary>
```
# For arm64 CPUs:
sudo docker run -it \
--name nextcloud-aio-mastercontainer \
--restart always \
-p 8080:8080 \
-e APACHE_PORT=11000 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest-arm64
```
</details>
On macOS see https://github.com/nextcloud/all-in-one#how-to-run-it-on-macos.
<details>
<summary>Command for Windows</summary>
```
docker run -it ^
--name nextcloud-aio-mastercontainer ^
--restart always ^
-p 8080:8080 ^
-e APACHE_PORT=11000 ^
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config ^
--volume //var/run/docker.sock:/var/run/docker.sock:ro ^
nextcloud/all-in-one:latest
```
</details>
#### Inspiration for a docker-compose file
Simply translate the docker run command into a docker-compose file. You can have a look at [this file](https://github.com/nextcloud/all-in-one/blob/main/docker-compose.yml) for some inspiration but you will need to modify it either way. You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588
---
#### How to continue?
After using the above command, you should be able to access the AIO Interface via `https://ip.address.of.the.host:8080`. Enter your domain that you've entered in the reverse proxy config and you should be done. Please do not forget to open port `3478/TCP` and `3478/UDP` in your firewall/router for the Talk container!
### 3. Optional: get a valid certificate for the AIO interface
If you want to also access your AIO interface publicly with a valid certificate, you can add e.g. the following config to your Caddyfile:
```
https://<your-nc-domain>:8443 {
reverse_proxy https://localhost:8080 {
transport http {
tls_insecure_skip_verify
}
}
}
```
Of course you need to modify `<your-nc-domain>` in the nextcloud.toml to the domain on which you want to run Nextcloud. **Please note:** The above configuration will only work if your reverse proxy is running directly on the host that is running the docker daemon. If the reverse proxy is running in a docker container, you can use the `--network host` when starting the reverse proxy container in order to connect the reverse proxy container to the host network. If that is not an option for you, you can alternatively instead of `locahost` use the ip-address that is displayed after running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (the command only works on Linux)
Afterwards should the AIO interface be accessible via `https://ip.address.of.the.host:8443`. You can alternatively change the domain to a different subdomain by using `https://<your-alternative-domain>:443` instead of `https://<your-nc-domain>:8443` in the Caddyfile and use that to access the AIO interface.
### 4. How to debug things?
If something does not work, follow the steps below:
1. Make sure to exactly follow the whole reverse proxy documentation step-for-step from top to bottom!
1. Make sure that the reverse proxy is running on the host OS or if running in a container, connected to the host network. If that is not possible, substitute `localhost` in the default configurations by the ip-address that you can easily get when running the following command on the host OS: `ip a | grep "scope global" | head -1 | awk '{print $2}' | sed 's|/.*||'` (The command only works on Linux)
1. Make sure that the mastercontainer is able to spawn other containers. You can do so by checking that the mastercontainer indeed has access to the Docker socket which might not be positioned in one of the suggested directories like `/var/run/docker.sock` but in a different directory, based on your OS and the way how you installed Docker. The mastercontainer logs should help figuring this out. You can have a look at them by running `sudo docker logs nextcloud-aio-mastercontainer` after the container is started the first time.
1. Check if after the mastercontainer was started, the reverse proxy if running inside a container, can reach the provided apache port. You can test this by running `nc -z locahost 11000; echo $?` from inside the reverse proxy container. If the output is `0`, everything works. Alternatively you can of course use instead of `locahost` the ip-address of the host here for the test.
1. Try to configure everything from scratch if it still does not work!

View File

@@ -0,0 +1,10 @@
# Initial setup
- [ ] Verify that after starting the test container, you can access the AIO interface using https://internal.ip.address:8080
- [ ] After clicking the self-signed-certificate warning away, it should show the setup page with an explanation what AIO is and the initial password and a button that contains a link to the AIO login page
- [ ] After copying the password and clicking on this button, it should open a new tab with the login page
- [ ] The login page should show an input field that allows to enter the AIO password and a `Log in` button
- [ ] After pasting the new password into the input field and clicking on this button button, you should be logged in
- [ ] You should now see the containers page and you should see three sections: one general section which explains what AIO is, one `New AIO instance` section and one section that allows to restore the whole AIO instance from backup.
You can now continue with [002-new-instance.md](./002-new-instance.md) or [010-restore-instance.md](./010-restore-instance.md).

View File

@@ -0,0 +1,31 @@
# New instance
For the below to work, it is important that you have a domain that you point onto your testserver and open port 443 in your router/firewall.
- [ ] The `New AIO instance` section should show an input field that allows to enter a domain that will be used for Nextcloud later on as well as a short explanation regarding dynamic DNS
- [ ] Now test a few examples in the input box:
- [ ] Entering `djfslkklk` should report that DNS config is not set or the domain is not in a valid format
- [ ] Entering `https://sdjflkjk.cpm` should report that this is not a valid domain
- [ ] Entering `10.0.0.1` should report that ip-addresses are not supported
- [ ] Entering `nextcloud.com` should report that the domain does not point to this server
- [ ] Entering the domain that does point to your server e.g. `yourdomain.com` should finally redirect you to the next screen (if you did not configure your domain yet or did not open port 443, it should report that to you)
- [ ] Now you should see a button `Start containers` and an explanation which points out that clicking on the button will start the containers and that this can take a long time.
- [ ] Below that you should see a section `Optional addons` which shows a checkbox list with addons that can be enabled or disabled.
- [ ] Collabora and Nextcloud Talk should be enabled, the rest disabled
- [ ] Unchecking/Checking any of these should insert a button that allows to save the set config
- [ ] Checking OnlyOffice and Collabora at the same time should show a warning that this is not supported and should not saving the new config
- [ ] Recommended is to uncheck all options now
- [ ] Clicking on the save button should reload the page and activate the new config
- [ ] Clickig on the `Start containers` button should finally reveal a big spinning wheel that should block all elements on the side of being clicked.
- [ ] After waiting a few minutes, it should reload and show a new page
- [ ] On top of the page should be shown which channel you are running
- [ ] Below that, it should show that containers are currently starting
- [ ] Below that it should show a section with Containers: Apache, Database, Nextcloud and Redis and that your containers are up-to-date
- [ ] On the bottom should be the Optional addons section shown but with disabled checkboxes (not clickable)
- [ ] A automatic reload every 5s should happen until all Containers are started (as long as this window is focused)
- [ ] After waiting a bit longer it should instead of the advice that your containers are currently running show the initial Nextcloud credentials (username, password) and below that a button that allows to open the Nextcloud interface in a new tab
- [ ] Clicking on that button should open the Nextcloud interface in a new tab and you should be able to log in using the provided credentials
- [ ] Below the Containers section it should show a `Stop containers` button
- [ ] Below the Containers section and above the Optional Addons section, you should see a Backup and restore section and an AIO password change section
You can now continue with [003-automatic-login.md](./003-automatic-login.md).

View File

@@ -0,0 +1,8 @@
# Automatic login
- [ ] After you log in to Nextcloud using the provided initial credentials, open https://yourdomain.com/settings/admin/overview
- [ ] There you should see a Nextcloud AIO section and a button that allows to log into the AIO interface.
- [ ] Clicking on this button should open the AIO interface in a new tab and should automatically log you in
- [ ] All sessions in other tabs that are currently open should be closed (you can verify by reloading all other AIO tabs)
You can now continue with [004-initial-backup.md](./004-initial-backup.md).

View File

@@ -0,0 +1,18 @@
# Initial backup
- [ ] In the Backup and restore section, you should now see and input box where you should type in the path where the backup should get created and some explanation below
- [ ] Enter `/` which should send an error
- [ ] Enter `/mnt/` or `/media/` or `/host_mnt/` or `/var/backups/` should send an error as well
- [ ] Accepted should be `/mnt/backup`, `/media/backup`, `/host_mnt/c/backup` and `/var/backups`.
- [ ] The side should now reload
- [ ] The initial Nextcloud credentials on top of the page that are visible when the containers are running should now be hidden in a details tag
- [ ] In the Backup restore section you should now see a Backup information section with important info like the encryption password, the backup location and more.
- [ ] Also you should see a Backup cretion section that contains a `Create backup` button.
- [ ] Clicking on the `Create backup` button should open a window prompt that allows to cancel the operation.
- [ ] Canceling should return to the website, confirming should reveal the big spinner again which should block the website again.
- [ ] After a while you should see the information that Backup container is currently running
- [ ] Below the Containers section you should see the option to `Start containers` again.
- [ ] After a while and a few automatic reloads (as long as the side is focused), you should be redirected to the usual page and seen in the Backup and restore section that the last backup was successful.
- [ ] Below thhat you should see a details tag that allows to reveal all backup options
You can now continue with [020-backup-and-restore.md](.//020-backup-and-restore.md)

View File

@@ -0,0 +1,19 @@
# Restore instance
For the below to work, you need a backup archive of an AIO instance and the location on the test machine and the password for the backup archive. You can get one here: [backup-archive](./assets/backup-archive/)
- [ ] The section that allows to restore the whole AIO instance from backup should show two input fields: one that allows to enter a location where the backup archive is located and one that allows to enter password of the archive. It should also show a short explanation regarding the path requirements
- [ ] Entering an incorrect path and/or password should let you continue and test your settings in the next step
- [ ] Clicking on the test button should after a reload bring you back to the initial screen where it should say that the test was unsuccessful. Also you should be able to have a look at the backup container logs for investigation what exactly failed.
- [ ] You should also now see the input boxes again where you can change the path and password, confirm it and bring you again to the screen where you can test your settings.
- [ ] Entering the correct path to the backup archive and the correct password here should:
- [ ] Should reload and should hide all options except the option to test the path and password
- [ ] After the test you should see the options to check the integrity of the backup and a list of backup archives that you can choose from to restore your instance
- [ ] Clicking on either option should show a window prompt that lets you cancel the operation
- [ ] Clicking on the integrity check option should check the integrity and report that the backup integrity is good after a while which should then only show the option to choose the backup archive that should be restored
- [ ] Choosing the restore option should finally restore your files.
- [ ] After waiting a while it should reload the page and should show the usual container interface again with the state of your containers (stopped) and the option to start and update the containers again.
- [ ] Clicking on `Start and update containers` should show a window prompt that you should create a backup. Canceling should cancel the operation, confirming should reveal the big spinner again.
- [ ] After waiting a bit, all containers should be green and your instance should be fully functional again
You can now continue with [020-backup-and-restore.md](./020-backup-and-restore.md)

View File

@@ -0,0 +1,11 @@
# Backup and restore
- [ ] Expanding all backup options in the Backup and restore sectioin should reveal a Backup information section, Backup creation section, Backup check section, Backup restore section and a Daily backup section.
- [ ] The backup restore section should list all available backup archives and list them from most recent to least recent.
- [ ] Clicking on either option of Create backup, Check backup integrity or Restore selected backup should run the corresponding action and report after a while in the last check, backup or restore was successful.
- [ ] Daily backup creatio should allow to enter a time in 24h format e.g. `04:00` should be accepted, `24:00` or `dfjlk` not.
- [ ] Submitting a time here should reload the page and reveal at the same place the option to delete the setting again.
- [ ] When the time of the automatic backup has come (you can test it by choosing a time that is e.g. only a minute away), it should automatically log you out (you can verify by reloading) and after you log in again you should see that the automatic backup is currently running.
- [ ] After a while you should see that your container are starting and in the Backup and restore section you should see that the backup was successful
You can now continue with [030-aio-password-change.md](./030-aio-password-change.md)

View File

@@ -0,0 +1,12 @@
# AIO password change
- [ ] In the AIO password change section you should see two input fields. And below the requirements for a new password
- [ ] When entering nothing it should report that you need to enter your current aio password
- [ ] When entering a false password, it should report that to you
- [ ] After entering your current password and leaving the new password empty it should report that you need to enter a new password
- [ ] After entering a new passwort shorter than 24 characters or not allowed characters, it should report that the password requirements are not met.
- [ ] `sdfjlksj` should not be accepted
- [ ] `jdsfklöjiroewoäsadjkfölk` should not be accepted
- [ ] `sdjlfj SDJFLK 32489 sdjklf` should which should reload the page
You can now continue with [040-login-behavior.md](./040-login-behavior.md)

View File

@@ -0,0 +1,7 @@
# Login behavior
- [ ] When opening the AIO interface in a new tab while the apache container is running, it should report on the login page that Nextcloud is running and you should use the automatic login
- [ ] When the apache container is stopped, you should see here an input field that allows you to enter the AIO password which should log you in
- [ ] Starting and stopping the containers multiple times should every time produce a new token that is used in the admin overview in Nextcloud as link in the button to log you into the AIO interface. (see [003-automatic-login.md](./003-automatic-login.md))
You can now continue with [050-optional-addons.md](./050-optional-addons.md)

View File

@@ -0,0 +1,12 @@
# Optional addons
- [ ] At the bottom of the page in the AIO interface, you should see the optional addons section
- [ ] You should be able to change optional addons when containers are stopped and not change them when containers are running
- [ ] Enabling either of the options should start a new container with the same or comparable name and should also list them in the containers section
- [ ] After all containers are started with the new config active, you should verify that the options were automatically activated/deactivated.
- [ ] ClamAV by trying to upload a testvirus to Nextcloud https://www.eicar.org/?page_id=3950
- [ ] Collabora by trying to open a .docx or .odt file in Nextcloud
- [ ] Nextcloud Talk by opening the Talk app in Nextcloud, creating a new chat and trying to join a call in this chat. Also verifying in the settings that the HPB and turn server work.
- [ ] Onlyoffice by trying to open a .docx file in Nextcloud
You can now continue with [060-environmental-variables.md](./060-environmental-variables.md)

View File

@@ -0,0 +1,6 @@
# Environmental variables
- [ ] When starting the mastercontainer with `-e APACHE_PORT=11000` on a clean instance, the domaincheck container should be started with that same port published. That makes sure that also the Apache container will use that port later on. Using a value here that is not a port will not allow the mastercontainer to start correctly.
- [ ] Make also sure that reverse proxies work by following https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#reverse-proxy-documentation and following [001-initial-setup.md](./001-initial-setup.md) and [002-new-instance.md](./002-new-instance.md)
- [ ] When starting the mastercontainer with `-e NEXTCLOUD_DATADIR="/mnt/testdata"` it should map that location from `/mnt/testdata` to `/mnt/ncdata` inside the Nextcloud container. Not having adjusted the permissions correctly before starting the Nextcloud container the first time will not allow the Nextcloud container to start correctly. See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir for allowed values.
- [ ] When starting the mastercontainer with `-e NEXTCLOUD_MOUNT="/mnt/"` it should map `/mnt/` to `/mnt/` inside the Nextcloud container. See https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host for allowed values.

View File

@@ -0,0 +1,4 @@
# Backup archive
The backup archive was moved here because of Git LFS limitations:
https://github.com/szaimen/AIO-backup-archive

7
tests/QA/readme.md Normal file
View File

@@ -0,0 +1,7 @@
# QA test plans
In this folder are manual test plans for QA located that allow to manually step through certain features and make sure that everything works as expected.
For a test instance, you should make sure that all potentially breaking changes are merged, build new containers by following https://github.com/nextcloud/all-in-one/blob/main/develop.md#how-to-build-new-containers, stop a potential old instance, remove it and delete all volumes. Afterwards start a new clean test instance by following https://github.com/nextcloud/all-in-one/blob/main/develop.md#developer-channel.
Best is to start testing with [001-initial-setup.md](./001-initial-setup.md).