Compare commits

...

80 Commits

Author SHA1 Message Date
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
43 changed files with 623 additions and 200 deletions

View File

@@ -27,6 +27,6 @@ labels: bug, 0. Needs triage
#### Nextcloud AIO version <!--- (see Nextcloud AIO interface) -->
#### Current channel <!--- (see the channel name in the Mastercontainer section) -->
#### Current channel <!--- (see the channel name in the AIO interface) -->
#### Other valuable info <!--- (like logs, screenshots & Co.) -->

View File

@@ -1,9 +1,12 @@
blank_issues_enabled: false
contact_links:
- name: 💡 Suggest a new feature or discuss one
url: https://github.com/nextcloud/all-in-one/discussions
url: https://github.com/nextcloud/all-in-one/discussions/categories/ideas
about: For new feature requests and discussion of existing ones
- name: Community Support and Help
- 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

View File

@@ -11,6 +11,8 @@ jobs:
steps:
- name: spelling or typos
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

@@ -1,7 +1,7 @@
# Caddy is a requirement
FROM caddy:2.4.6-alpine as caddy
FROM debian:bullseye-20220328-slim
FROM debian:bullseye-20220418-slim
EXPOSE 80

View File

@@ -1,4 +1,4 @@
FROM debian:bullseye-20220328-slim
FROM debian:bullseye-20220418-slim
RUN set -ex; \
\

View File

@@ -178,6 +178,7 @@ if [ "$BORG_MODE" = restore ]; then
if ! rsync --stats --archive --human-readable -vv --delete \
--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 from backup."
@@ -191,6 +192,13 @@ if [ "$BORG_MODE" = restore ]; then
# 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 \
@@ -212,6 +220,10 @@ if [ "$BORG_MODE" = restore ]; then
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

View File

@@ -35,10 +35,8 @@ fi
rm -f "/nextcloud_aio_volumes/nextcloud_aio_database_dump/backup-is-running"
# Get a list of all available borg archives
set -x
borg list "$BORG_BACKUP_DIRECTORY" | grep "nextcloud-aio" | awk -F " " '{print $1","$3,$4}' > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
chmod +r "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
set +x
if [ -n "$FAILED" ]; then
if [ "$BORG_MODE" = backup ]; then

View File

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

View File

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

View File

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

View File

@@ -5,7 +5,7 @@ FROM docker:20.10.14-dind-alpine3.15 as dind
FROM caddy:2.4.6-alpine as caddy
# From https://github.com/docker-library/php/blob/master/8.0/bullseye/apache/Dockerfile
FROM php:8.0.17-apache-bullseye
FROM php:8.0.18-apache-bullseye
EXPOSE 80
EXPOSE 8080
@@ -26,6 +26,7 @@ RUN apt-get update; \
openssl \
sudo \
dpkg-dev \
netcat \
; \
rm -rf /var/lib/apt/lists/*
@@ -84,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,12 +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
# Remove dangling images
sudo -u www-data docker image prune -f
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
sleep 1d
# Remove dangling images
sudo -u www-data docker image prune -f
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

@@ -127,7 +127,7 @@ 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/
# Adjust 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.17-fpm-alpine3.15
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,7 +61,7 @@ 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 memcached-3.2.0; \
pecl install redis-5.3.7; \
pecl install imagick-3.7.0; \
\
@@ -105,7 +105,7 @@ RUN { \
VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 23.0.3
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

@@ -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() {
@@ -211,9 +211,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
@@ -230,6 +233,14 @@ 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
@@ -286,8 +297,6 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then
php /var/www/html/occ app:update richdocuments
fi
php /var/www/html/occ config:app:set richdocuments wopi_url --value="https://$NC_DOMAIN/"
php /var/www/html/occ config:app:set richdocuments public_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
else

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

@@ -1,4 +1,4 @@
FROM ubuntu:focal-20220316
FROM ubuntu:focal-20220415
EXPOSE 3478

View File

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

View File

@@ -18,7 +18,12 @@ It will now also select the developer channel for all other containers automatic
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`.

170
php/composer.lock generated
View File

@@ -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": {
"files": [
"functions.php"
],
"psr-4": {
"Opis\\Closure\\": "src/"
}
},
"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)",
@@ -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",
@@ -1372,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": {
@@ -1419,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": [
{
@@ -1435,7 +1429,7 @@
"type": "tidelift"
}
],
"time": "2021-11-01T23:48:49+00:00"
"time": "2022-01-02T09:55:41+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -1683,16 +1677,16 @@
},
{
"name": "twig/twig",
"version": "v3.3.9",
"version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d"
"reference": "8442df056c51b706793adf80a9fd363406dd3674"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/6ff9b0e440fa66f97f207e181c41340ddfa5683d",
"reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/8442df056c51b706793adf80a9fd363406dd3674",
"reference": "8442df056c51b706793adf80a9fd363406dd3674",
"shasum": ""
},
"require": {
@@ -1743,7 +1737,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.3.9"
"source": "https://github.com/twigphp/Twig/tree/v3.3.10"
},
"funding": [
{
@@ -1755,7 +1749,7 @@
"type": "tidelift"
}
],
"time": "2022-03-25T09:37:52+00:00"
"time": "2022-04-06T06:47:41+00:00"
}
],
"packages-dev": [],

View File

@@ -131,8 +131,10 @@
"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"
"ONLYOFFICE_HOST=nextcloud-aio-onlyoffice",
"DAILY_BACKUP_RUNNING=%DAILY_BACKUP_RUNNING%"
],
"maxShutdownTime": 10,
"restartPolicy": "unless-stopped"
@@ -166,7 +168,7 @@
"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": [],

View File

@@ -60,9 +60,6 @@
<InvalidScalarArgument occurrences="1">
<code>$internalPort</code>
</InvalidScalarArgument>
<PossiblyFalseOperand occurrences="1">
<code>strpos($fullDigest, "@")</code>
</PossiblyFalseOperand>
<RedundantCondition occurrences="1">
<code>$container-&gt;GetInternalPorts() !== null</code>
</RedundantCondition>

View File

@@ -93,6 +93,8 @@ $app->get('/containers', function ($request, $response, $args) use ($container)
'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) {

View File

@@ -43,6 +43,15 @@ class ConfigurationController
$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!");

View File

@@ -70,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);
@@ -79,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 {
@@ -134,6 +137,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);
@@ -144,14 +157,17 @@ class DockerController
$id = self::TOP_CONTAINER;
$this->PerformRecursiveContainerStart($id);
return $response->withStatus(201)->withHeader('Location', '/');
}
public function StartWatchtowerContainer(Request $request, Response $response, $args) : Response {
$this->startWatchtower();
return $response->withStatus(201)->withHeader('Location', '/');
}
public function startWatchtower() : void {
$id = 'nextcloud-aio-watchtower';
$this->PerformRecursiveContainerStart($id);
return $response->withStatus(201)->withHeader('Location', '/');
}
private function PerformRecursiveContainerStop(string $id) : void

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

@@ -444,4 +444,39 @@ class ConfigurationManager
$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

@@ -97,14 +97,21 @@ class DockerActionManager
{
$tag = $this->GetCurrentChannel();
$runningDigest = $this->GetRepoDigestOfContainer($container->GetIdentifier());
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($container->GetContainerName(), $tag);
if ($runningDigest === $remoteDigest || $remoteDigest === null || $runningDigest === null) {
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
@@ -267,6 +274,12 @@ class DockerActionManager
} 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]);
}
@@ -352,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);
@@ -361,15 +374,34 @@ 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;
} catch (\Exception $e) {
error_log('Could not get digest of container ' . $this->BuildApiUrl($containerName) . ' ' . $e->getMessage());
return null;
}
}
@@ -404,14 +436,21 @@ class DockerActionManager
$tag = $this->GetCurrentChannel();
$runningDigest = $this->GetRepoDigestOfContainer($containerName);
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($imageName, $tag);
if ($remoteDigest === $runningDigest || $remoteDigest === null || $runningDigest === null) {
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) : void

View File

@@ -52,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,8 +16,7 @@
</header>
<div class="content">
<h1>Nextcloud AIO Beta v0.9.1</h1>
This is beta software and not production ready.<br><br>
<h1>Nextcloud AIO v1.0.2</h1>
{% set isAnyRunning = false %}
{% set isAnyRestarting = false %}
@@ -50,8 +49,20 @@
{% endif %}
{% endfor %}
{% if 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-mastercontainer">Logs</a>)<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 all containers and all 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 is_backup_container_running == false and domain == "" %}
@@ -76,17 +87,17 @@
</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/>
{% endif %}
<h2>Restore AIO instance from backup</h2>
You can alternatively restore an AIO instance from backup.<br><br>
<h2>Restore AIO instance from backup</h2>
You can alternatively restore an AIO instance from backup.<br><br>
{% endif %}
{% 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 password in order to make it work! Afterwards click on 'Test path and password' button to verify the settings!<br><br>
Please adjust the path and/or password in order to make it work! After changing and submitting the values, click on 'Test path and password' button at the bottom of this page to verify and test the new settings!<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 %}
@@ -106,7 +117,7 @@
<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 }}</option>
<option value="{{ restore_time }}">{{ restore_time }} UTC</option>
{% endfor %}
</select>
<input class="button" type="submit" value="Restore selected backup"/>
@@ -144,20 +155,23 @@
{% 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 != "" %}
You are currently running the {{ current_channel }} channel. (<a href="/api/docker/logs?id=nextcloud-aio-mastercontainer">Logs</a>)<br><br>
{% if isAnyRunning == true %}
{% if isApacheStarting != true %}
<details>
<summary>Click here to reveal the initial Nextcloud credentials</summary><br />
Initial Nextcloud username: admin<br />
Initial Nextcloud password: {{ nextcloud_password }}
Initial Nextcloud username: <b>admin</b><br />
Initial Nextcloud password: <b>{{ nextcloud_password }}</b>
</details><br /><br />
<a href="https://{{ domain }}" class="button" target="_blank" rel="noopener">Open your Nextcloud ↗</a><br/>
{% else %}
@@ -282,24 +296,24 @@
<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 is_backup_container_running == false %}
{% 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: {{ borgbackup_password }} <br /><br/>
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 %}
@@ -327,11 +341,31 @@
<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 }}</option>
<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 creation</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 and 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 and 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 %}
{% if has_backup_run_once == false %}
@@ -359,8 +393,8 @@
{% endif %}
{% if is_backup_container_running == false %}
<h2>Optional addons</h2>
In this section, you can find optional addons.<br>
You can enable or disaable them when your containers are stopped.<br><br>
In this section you can find optional addons.<br>
You can enable or disable them when your containers are stopped.<br><br>
<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}}">
@@ -399,7 +433,7 @@
{% endif %}
{% endif %}
{% if isApacheStarting == true or is_backup_container_running == true or isWatchtowerRunning == true %}
{% 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>

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" 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,7 +4,8 @@
<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>
<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>

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,8 +7,8 @@ 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).
@@ -106,6 +102,9 @@ 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
### 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.
@@ -117,7 +116,7 @@ Additionally, there is a cronjob that runs once a day that checks for container
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.

View File

@@ -4,6 +4,8 @@ Basically, you need to specify the port that the apache container shall use and
All examples below will use port `11000` as example apache port. Also it is supposed that the reverse proxy runs on the same server like AIO, hence `localhost` is used and not an internal ip-address to point to the AIO instance. Modify both to your needings.
**Info:** The instructions below assume that your reverse proxy is installed directly on the host, not inside a separate docker container. If you want to run the reverse proxy inside a docker container, you can do so by using the `--network host` option when starting the reverse proxy container.
### Reverse proxy config examples
#### Caddy
@@ -31,6 +33,9 @@ Of course you need to modify `<your-nc-domain>` to the domain on which you want
<summary>click here to expand</summary>
<br>
**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:
```