Compare commits

..

37 Commits

Author SHA1 Message Date
Simon L
bfcbc41141 Merge pull request #1136 from nextcloud/enh/noid/add-tz-confirmation
add a confirmation for the timezone
2022-09-08 17:39:29 +02:00
szaimen
3ac6fc590a add a confirmation for the timezone
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-08 17:33:33 +02:00
Simon L
0aee7c6bb9 Merge pull request #1135 from nextcloud/revert-1118-enh/1073/add-db-check
Revert "add a check for init-user-db.sh"
2022-09-08 17:32:57 +02:00
Simon L
feb6438d39 Revert "add a check for init-user-db.sh"
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-08 17:27:15 +02:00
szaimen
4ecfaa0650 increase to 2.0.2
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-08 16:15:16 +02:00
Simon L
8dec561045 Merge pull request #1093 from nextcloud/fix/noid/container-logs
fix container logs new line
2022-09-08 16:07:07 +02:00
Simon L
2ab42b06ed Merge pull request #1094 from nextcloud/enh/1077/backup-check
rework the daily backup script and allow to start the backup check from it
2022-09-08 16:05:24 +02:00
Simon L
d25c74e382 Merge pull request #1118 from nextcloud/enh/1073/add-db-check
add a check for init-user-db.sh
2022-09-08 15:49:22 +02:00
Simon L
8c544d96c9 Merge pull request #1069 from nextcloud/fix/1067/fix-pulling-images
do not pull containers if START_CONTAINERS was provided and not …
2022-09-08 15:45:54 +02:00
Simon L
3280a08430 Merge pull request #1092 from nextcloud/fix/1085/fix-dbpassword
the dbpassword and dbuser do not need to be overwritten anymore
2022-09-08 15:44:57 +02:00
Simon L
29f3952713 Merge pull request #1095 from nextcloud/enh/noid/borg-logs
do not show progress for borg operations
2022-09-08 15:44:36 +02:00
Simon L
3bc55fb104 Merge pull request #1096 from nextcloud/fix/noid/mastercontainer-logs
get rid of some strange lines in the mastercontainer logs
2022-09-08 15:44:11 +02:00
Simon L
d01eed902a Merge pull request #1107 from nextcloud/enh/596/allow-to-change-backup-location
Allow to choose a different backup location if the first backup fails
2022-09-08 15:32:23 +02:00
Simon L
88751452c7 Merge pull request #1129 from MartinM01/fix/1121/fix-hpb-participants-limited-7-8
TURN_CONF set total-quota unlimited
2022-09-08 15:31:23 +02:00
Simon L
f7b0787fe5 Merge pull request #1134 from nextcloud/nextcloud-container-update
Nextcloud update
2022-09-08 15:30:25 +02:00
szaimen
46b1a0c068 nextcloud-update automated change
Signed-off-by: GitHub <noreply@github.com>
2022-09-08 12:50:47 +00:00
martin.mueller
80482657be TURN_CONF set total-quota unlimited
Signed-off-by: martin.mueller <martin.mueller@model-engineers.com>
2022-09-07 13:28:04 +02:00
Simon L
2c7e0518f1 Merge pull request #1120 from nextcloud/dependabot/docker/Containers/imaginary/nextcloud/imaginary-20220905
Bump nextcloud/imaginary from 20220822 to 20220905 in /Containers/imaginary
2022-09-07 09:59:24 +02:00
Simon L
fbb9180c0f Merge pull request #1104 from nextcloud/dependabot/docker/Containers/nextcloud/php-8.0.23-fpm-alpine3.16
Bump php from 8.0.22-fpm-alpine3.16 to 8.0.23-fpm-alpine3.16 in /Containers/nextcloud
2022-09-07 09:58:29 +02:00
Simon L
5a91eeb55c Merge pull request #1103 from nextcloud/dependabot/docker/Containers/talk/ubuntu-focal-20220826
Bump ubuntu from focal-20220801 to focal-20220826 in /Containers/talk
2022-09-07 09:58:10 +02:00
Simon L
b8d686fa00 Merge pull request #1102 from nextcloud/dependabot/docker/Containers/mastercontainer/php-8.0.23-apache-bullseye
Bump php from 8.0.22-apache-bullseye to 8.0.23-apache-bullseye in /Containers/mastercontainer
2022-09-07 09:57:53 +02:00
Simon L
0614d9d3f5 Merge pull request #1081 from nextcloud/aio-dependency-update
Dependency updates
2022-09-07 09:56:26 +02:00
dependabot[bot]
16c75492f3 Bump php in /Containers/mastercontainer
Bumps php from 8.0.22-apache-bullseye to 8.0.23-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-09-07 07:46:40 +00:00
dependabot[bot]
0cc5d278fb Bump php in /Containers/nextcloud
Bumps php from 8.0.22-fpm-alpine3.16 to 8.0.23-fpm-alpine3.16.

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-07 07:46:39 +00:00
Simon L
d14ece713f Merge pull request #1045 from nextcloud/aio-yaml-update
Yaml updates
2022-09-07 09:45:53 +02:00
dependabot[bot]
06315218b8 Bump nextcloud/imaginary in /Containers/imaginary
Bumps nextcloud/imaginary from 20220822 to 20220905.

---
updated-dependencies:
- dependency-name: nextcloud/imaginary
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 16:04:45 +00:00
szaimen
e03e3cfc08 dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-09-05 12:19:49 +00:00
szaimen
04abdbed9e Yaml updates
Signed-off-by: GitHub <noreply@github.com>
2022-09-05 12:19:49 +00:00
szaimen
abb414129a add a check for init-user-db.sh
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-05 14:06:16 +02:00
szaimen
fa4eb44898 Allow to choose a different backup location if the first backup fails
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-03 15:43:40 +02:00
dependabot[bot]
b61d2d46fd Bump ubuntu from focal-20220801 to focal-20220826 in /Containers/talk
Bumps ubuntu from focal-20220801 to focal-20220826.

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 12:35:07 +00:00
szaimen
999c74a731 get rid of some strange lines in the mastercontainer logs
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-08-31 19:04:47 +02:00
szaimen
ec1605d29a do not show progress for borg operations
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-08-31 14:22:11 +02:00
szaimen
d6e1f62202 rework the daily backup script and allow to start the backup check from it
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-08-31 14:08:40 +02:00
szaimen
5eaff0ba2f fix container logs new line
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-08-31 13:45:23 +02:00
szaimen
7ad975f4b1 the dbpassword and dbuser do not need to be overwritten anymore
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-08-31 12:31:56 +02:00
szaimen
c872c259c1 do not pull containers START_CONTAINERS was provided and not AUTOMATIC_UPDATES
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-08-26 22:52:19 +02:00
18 changed files with 191 additions and 60 deletions

View File

@@ -87,10 +87,12 @@ if [ "$BORG_MODE" = backup ]; then
# Don't initialize if already initialized
if [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" ]; then
echo "Cannot initialize a new repository as that was already done at least one time."
echo "If you still want to do so, you may delete the 'borg.config' file that is stored in the mastercontainer volume manually, which will allow you to initialize a new borg repository in the chosen directory."
exit 1
fi
echo "initializing repository..."
NEW_REPOSITORY=1
if ! borg init --debug --encryption=repokey-blake2 "$BORG_BACKUP_DIRECTORY"; then
echo "Could not initialize borg repository."
rm -f "$BORG_BACKUP_DIRECTORY/config"
@@ -124,15 +126,19 @@ if [ "$BORG_MODE" = backup ]; then
# Borg options
# auto,zstd compression seems to has the best ratio based on:
# https://forum.level1techs.com/t/optimal-compression-for-borg-backups/145870/6
BORG_OPTS=(--stats --progress --compression "auto,zstd" --exclude-caches --checkpoint-interval 86400)
BORG_OPTS=(--stats --compression "auto,zstd" --exclude-caches --checkpoint-interval 86400)
# Create the backup
echo "Starting the backup..."
get_start_time
if ! borg create "${BORG_OPTS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio" "/nextcloud_aio_volumes/"; then
echo "Deleting the failed backup archive..."
borg delete --stats --progress "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio"
borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio"
echo "Backup failed!"
if [ "$NEW_REPOSITORY" = 1 ]; then
echo "Deleting borg.config file so that you can choose a different location for the backup."
rm "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config"
fi
exit 1
fi
@@ -140,7 +146,7 @@ if [ "$BORG_MODE" = backup ]; then
rm -f "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
# Prune options
BORG_PRUNE_OPTS=(--stats --progress --keep-within=7d --keep-weekly=4 --keep-monthly=6 "$BORG_BACKUP_DIRECTORY")
BORG_PRUNE_OPTS=(--stats --keep-within=7d --keep-weekly=4 --keep-monthly=6 "$BORG_BACKUP_DIRECTORY")
# Prune archives
echo "Pruning the archives..."
@@ -162,7 +168,7 @@ if [ "$BORG_MODE" = backup ]; then
done
if ! borg create "${BORG_OPTS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then
echo "Deleting the failed backup archive..."
borg delete --stats --progress "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes"
borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes"
echo "Backup of additional docker-volumes failed!"
exit 1
fi
@@ -186,7 +192,7 @@ if [ "$BORG_MODE" = backup ]; then
done
if ! borg create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then
echo "Deleting the failed backup archive..."
borg delete --stats --progress "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts"
borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts"
echo "Backup of additional host-mounts failed!"
exit 1
fi
@@ -320,7 +326,7 @@ if [ "$BORG_MODE" = check ]; then
echo "Checking the backup integrity..."
# Perform the check
if ! borg check --verify-data --progress "$BORG_BACKUP_DIRECTORY"; then
if ! borg check --verify-data "$BORG_BACKUP_DIRECTORY"; then
echo "Some errors were found while checking the backup integrity!"
exit 1
fi

View File

@@ -1,5 +1,5 @@
# From https://github.com/h2non/imaginary/blob/master/Dockerfile
FROM nextcloud/imaginary:20220822
FROM nextcloud/imaginary:20220905
USER root
RUN set -ex; \

View File

@@ -5,7 +5,7 @@ FROM docker:20.10.17-dind-alpine3.16 as dind
FROM caddy:2.5.2-alpine as caddy
# From https://github.com/docker-library/php/blob/master/8.0/bullseye/apache/Dockerfile
FROM php:8.0.22-apache-bullseye
FROM php:8.0.23-apache-bullseye
EXPOSE 80
EXPOSE 8080

View File

@@ -1,10 +1,16 @@
#!/bin/bash
echo "Daily backup has started"
echo "Daily backup script has started"
# Daily backup and backup check cannot be run at the same time
if [ "$DAILY_BACKUP" = 1 ] && [ "$CHECK_BACKUP" = 1 ]; then
echo "Daily backup and backup check cannot be run at the same time. Exiting..."
exit 1
fi
# 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
if [ "$LOCK_FILE_PRESENT" = 0 ] || ! [ -f "/mnt/docker-aio-config/data/daily_backup_running" ]; then
rm -f "/mnt/docker-aio-config/session/"*
fi
sudo -u www-data touch "/mnt/docker-aio-config/data/daily_backup_running"
@@ -26,6 +32,8 @@ done
# Update the mastercontainer
if [ "$AUTOMATIC_UPDATES" = 1 ]; then
echo "Starting mastercontainer update..."
echo "(The script might get exited due to that. In order to update all the other containers correctly, you need to run this script with the same settings a second time.)"
sudo -u www-data php /var/www/docker-aio/php/src/Cron/UpdateMastercontainer.php
fi
@@ -40,20 +48,31 @@ else
fi
# Stop containers if required
if [ "$DAILY_BACKUP" != 1 ] || [ "$STOP_CONTAINERS" = 1 ]; then
# shellcheck disable=SC2235
if [ "$CHECK_BACKUP" != 1 ] && ([ "$DAILY_BACKUP" != 1 ] || [ "$STOP_CONTAINERS" = 1 ]); then
echo "Stopping containers..."
sudo -u www-data php /var/www/docker-aio/php/src/Cron/StopContainers.php
fi
# Execute the backup itself and some related tasks (also stops the containers)
if [ "$DAILY_BACKUP" = 1 ]; then
echo "Creating daily backup..."
sudo -u www-data php /var/www/docker-aio/php/src/Cron/CreateBackup.php
fi
# Execute backup check
if [ "$CHECK_BACKUP" = 1 ]; then
echo "Starting backup check..."
sudo -u www-data php /var/www/docker-aio/php/src/Cron/CheckBackup.php
fi
# Start and/or update containers
if [ "$AUTOMATIC_UPDATES" = 1 ]; then
echo "Starting and updating containers..."
sudo -u www-data php /var/www/docker-aio/php/src/Cron/StartAndUpdateContainers.php
else
if [ "$START_CONTAINERS" = 1 ]; then
echo "Starting containers without updating them..."
sudo -u www-data php /var/www/docker-aio/php/src/Cron/StartContainers.php
fi
fi
@@ -75,7 +94,8 @@ if [ "$DAILY_BACKUP" = 1 ]; then
fi
done
fi
echo "Sending backup notification..."
sudo -u www-data php /var/www/docker-aio/php/src/Cron/BackupNotification.php
fi
echo "Daily backup has finished"
echo "Daily backup script has finished"

View File

@@ -2,15 +2,18 @@
while true; do
while [ "$(find "/mnt/docker-aio-config/session/" -mindepth 1 -exec grep "aio_authenticated|[a-z]:1" {} \; | wc -l)" -gt 1 ]; do
# First delete all session files that are not authenticated
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
if [ -f "$SESSION_FILE" ] && ! grep -q "aio_authenticated|[a-z]:1" "$SESSION_FILE"; then
rm "$SESSION_FILE"
fi
done
# Second clean up all sessions that are authenticated
echo "Deleting duplicate sessions"
unset OLDEST_FILE
set -x

View File

@@ -1,5 +1,5 @@
# From https://github.com/nextcloud/docker/blob/master/23/fpm-alpine/Dockerfile
FROM php:8.0.22-fpm-alpine3.16
FROM php:8.0.23-fpm-alpine3.16
# Custom: change id of www-data user as it needs to be the same like on old installations
RUN set -ex; \
@@ -107,7 +107,7 @@ RUN { \
VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 24.0.4
ENV NEXTCLOUD_VERSION 24.0.5
RUN set -ex; \
apk add --no-cache --virtual .fetch-deps \

View File

@@ -17,8 +17,9 @@ if [ -f "/var/www/html/config/config.php" ]; then
echo "Waiting for the database to start..."
sleep 5
done
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
# The code below is hopefully not needed anymore. Was introduced with https://github.com/nextcloud/all-in-one/pull/218
# 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

View File

@@ -1,4 +1,4 @@
FROM ubuntu:focal-20220801
FROM ubuntu:focal-20220826
RUN set -ex; \
\

View File

@@ -23,7 +23,7 @@ lt-cred-mech
use-auth-secret
static-auth-secret=$TURN_SECRET
realm=$NC_DOMAIN
total-quota=100
total-quota=0
bps-capacity=0
stale-nonce
no-multicast-peers

View File

@@ -47,6 +47,8 @@ services:
depends_on:
- nextcloud-aio-database
- nextcloud-aio-redis
- nextcloud-aio-fulltextsearch
- nextcloud-aio-imaginary
image: nextcloud/aio-nextcloud:latest-arm64
volumes:
- nextcloud_aio_nextcloud:/var/www/html:rw
@@ -76,6 +78,12 @@ services:
- UPDATE_NEXTCLOUD_APPS=${UPDATE_NEXTCLOUD_APPS}
- TZ=${TIMEZONE}
- TALK_PORT=${TALK_PORT}
- IMAGINARY_ENABLED=${IMAGINARY_ENABLED}
- IMAGINARY_HOST=nextcloud-aio-imaginary
- PHP_UPLOAD_LIMIT=${NEXTCLOUD_UPLOAD_LIMIT}
- FULLTEXTSEARCH_ENABLED=${FULLTEXTSEARCH_ENABLED}
- FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch
- PHP_MAX_TIME=${NEXTCLOUD_MAX_TIME}
stop_grace_period: 10s
restart: unless-stopped
networks:
@@ -123,6 +131,30 @@ services:
networks:
- nextcloud-aio
nextcloud-aio-imaginary:
container_name: nextcloud-aio-imaginary
image: nextcloud/aio-imaginary:latest-arm64
environment:
- TZ=${TIMEZONE}
stop_grace_period: 10s
restart: unless-stopped
networks:
- nextcloud-aio
nextcloud-aio-fulltextsearch:
container_name: nextcloud-aio-fulltextsearch
image: nextcloud/aio-fulltextsearch:latest-arm64
environment:
- TZ=${TIMEZONE}
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms1024M -Xmx1024M
volumes:
- nextcloud_aio_elasticsearch:/usr/share/elasticsearch/data:rw
stop_grace_period: 10s
restart: unless-stopped
networks:
- nextcloud-aio
volumes:
nextcloud_aio_apache:
name: nextcloud_aio_apache
@@ -130,6 +162,8 @@ volumes:
name: nextcloud_aio_database
nextcloud_aio_database_dump:
name: nextcloud_aio_database_dump
nextcloud_aio_elasticsearch:
name: nextcloud_aio_elasticsearch
nextcloud_aio_nextcloud:
name: nextcloud_aio_nextcloud
nextcloud_aio_nextcloud_data:

View File

@@ -6,7 +6,6 @@ services:
depends_on:
- nextcloud-aio-onlyoffice
- nextcloud-aio-collabora
- nextcloud-aio-clamav
- nextcloud-aio-talk
- nextcloud-aio-nextcloud
image: nextcloud/aio-apache:latest
@@ -50,6 +49,9 @@ services:
depends_on:
- nextcloud-aio-database
- nextcloud-aio-redis
- nextcloud-aio-clamav
- nextcloud-aio-fulltextsearch
- nextcloud-aio-imaginary
image: nextcloud/aio-nextcloud:latest
volumes:
- nextcloud_aio_nextcloud:/var/www/html:rw
@@ -84,6 +86,12 @@ services:
- UPDATE_NEXTCLOUD_APPS=${UPDATE_NEXTCLOUD_APPS}
- TZ=${TIMEZONE}
- TALK_PORT=${TALK_PORT}
- IMAGINARY_ENABLED=${IMAGINARY_ENABLED}
- IMAGINARY_HOST=nextcloud-aio-imaginary
- PHP_UPLOAD_LIMIT=${NEXTCLOUD_UPLOAD_LIMIT}
- FULLTEXTSEARCH_ENABLED=${FULLTEXTSEARCH_ENABLED}
- FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch
- PHP_MAX_TIME=${NEXTCLOUD_MAX_TIME}
stop_grace_period: 10s
restart: unless-stopped
networks:
@@ -157,6 +165,30 @@ services:
restart: unless-stopped
networks:
- nextcloud-aio
nextcloud-aio-imaginary:
container_name: nextcloud-aio-imaginary
image: nextcloud/aio-imaginary:latest
environment:
- TZ=${TIMEZONE}
stop_grace_period: 10s
restart: unless-stopped
networks:
- nextcloud-aio
nextcloud-aio-fulltextsearch:
container_name: nextcloud-aio-fulltextsearch
image: nextcloud/aio-fulltextsearch:latest
environment:
- TZ=${TIMEZONE}
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms1024M -Xmx1024M
volumes:
- nextcloud_aio_elasticsearch:/usr/share/elasticsearch/data:rw
stop_grace_period: 10s
restart: unless-stopped
networks:
- nextcloud-aio
volumes:
nextcloud_aio_apache:
@@ -167,6 +199,8 @@ volumes:
name: nextcloud_aio_database
nextcloud_aio_database_dump:
name: nextcloud_aio_database_dump
nextcloud_aio_elasticsearch:
name: nextcloud_aio_elasticsearch
nextcloud_aio_nextcloud:
name: nextcloud_aio_nextcloud
nextcloud_aio_onlyoffice:

View File

@@ -5,11 +5,15 @@ CLAMAV_ENABLED=no # Setting this to "yes" enables the option in Nextclo
COLLABORA_DICTIONARIES=de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru # You can change this in order to enable other dictionaries for collabora
COLLABORA_ENABLED=yes # Setting this to "yes" enables the option in Nextcloud automatically.
DATABASE_PASSWORD= # TODO! This needs to be a unique and good password!
FULLTEXTSEARCH_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically.
IMAGINARY_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically.
JANUS_API_KEY= # TODO! This needs to be a unique and good password!
NC_DOMAIN=yourdomain.com # TODO! Needs to be changed to the domain that you want to use for Nextcloud.
NEXTCLOUD_DATADIR=nextcloud_aio_nextcloud_data # You can change this to e.g. "/mnt/ncdata" to map it to a location on your host. It needs to be adjusted before the first startup and never afterwards!
NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit of the Nextcloud container
NEXTCLOUD_MOUNT=/mnt/ # This allows the Nextcloud container to access directories on the host. It must never be equal to the value of NEXTCLOUD_DATADIR!
NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin".
NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of the Nextcloud container
ONLYOFFICE_ENABLED=no # Setting this to "yes" enables the option in Nextcloud automatically.
ONLYOFFICE_SECRET= # TODO! This needs to be a unique and good password!
REDIS_PASSWORD= # TODO! This needs to be a unique and good password!

71
php/composer.lock generated
View File

@@ -8,16 +8,16 @@
"packages": [
{
"name": "guzzlehttp/guzzle",
"version": "7.4.5",
"version": "7.5.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82"
"reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82",
"reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba",
"reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba",
"shasum": ""
},
"require": {
@@ -32,10 +32,10 @@
"psr/http-client-implementation": "1.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4.1",
"bamarni/composer-bin-plugin": "^1.8.1",
"ext-curl": "*",
"php-http/client-integration-tests": "^3.0",
"phpunit/phpunit": "^8.5.5 || ^9.3.5",
"phpunit/phpunit": "^8.5.29 || ^9.5.23",
"psr/log": "^1.1 || ^2.0 || ^3.0"
},
"suggest": {
@@ -45,8 +45,12 @@
},
"type": "library",
"extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": false
},
"branch-alias": {
"dev-master": "7.4-dev"
"dev-master": "7.5-dev"
}
},
"autoload": {
@@ -112,7 +116,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.4.5"
"source": "https://github.com/guzzle/guzzle/tree/7.5.0"
},
"funding": [
{
@@ -128,20 +132,20 @@
"type": "tidelift"
}
],
"time": "2022-06-20T22:16:13+00:00"
"time": "2022-08-28T15:39:27+00:00"
},
{
"name": "guzzlehttp/promises",
"version": "1.5.1",
"version": "1.5.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
"reference": "b94b2807d85443f9719887892882d0329d1e2598"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598",
"reference": "b94b2807d85443f9719887892882d0329d1e2598",
"shasum": ""
},
"require": {
@@ -196,7 +200,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.5.1"
"source": "https://github.com/guzzle/promises/tree/1.5.2"
},
"funding": [
{
@@ -212,20 +216,20 @@
"type": "tidelift"
}
],
"time": "2021-10-22T20:56:57+00:00"
"time": "2022-08-28T14:55:35+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "2.4.0",
"version": "2.4.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "13388f00956b1503577598873fffb5ae994b5737"
"reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737",
"reference": "13388f00956b1503577598873fffb5ae994b5737",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379",
"reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379",
"shasum": ""
},
"require": {
@@ -239,15 +243,19 @@
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4.1",
"bamarni/composer-bin-plugin": "^1.8.1",
"http-interop/http-factory-tests": "^0.9",
"phpunit/phpunit": "^8.5.8 || ^9.3.10"
"phpunit/phpunit": "^8.5.29 || ^9.5.23"
},
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
"type": "library",
"extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": false
},
"branch-alias": {
"dev-master": "2.4-dev"
}
@@ -311,7 +319,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.4.0"
"source": "https://github.com/guzzle/psr7/tree/2.4.1"
},
"funding": [
{
@@ -327,7 +335,7 @@
"type": "tidelift"
}
],
"time": "2022-06-20T21:43:11+00:00"
"time": "2022-08-28T14:45:39+00:00"
},
{
"name": "http-interop/http-factory-guzzle",
@@ -389,25 +397,26 @@
},
{
"name": "laravel/serializable-closure",
"version": "v1.2.0",
"version": "v1.2.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/serializable-closure.git",
"reference": "09f0e9fb61829f628205b7c94906c28740ff9540"
"reference": "d78fd36ba031a1a695ea5a406f29996948d7011b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/09f0e9fb61829f628205b7c94906c28740ff9540",
"reference": "09f0e9fb61829f628205b7c94906c28740ff9540",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/d78fd36ba031a1a695ea5a406f29996948d7011b",
"reference": "d78fd36ba031a1a695ea5a406f29996948d7011b",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0"
},
"require-dev": {
"pestphp/pest": "^1.18",
"phpstan/phpstan": "^0.12.98",
"symfony/var-dumper": "^5.3"
"nesbot/carbon": "^2.61",
"pestphp/pest": "^1.21.3",
"phpstan/phpstan": "^1.8.2",
"symfony/var-dumper": "^5.4.11"
},
"type": "library",
"extra": {
@@ -444,7 +453,7 @@
"issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure"
},
"time": "2022-05-16T17:09:47+00:00"
"time": "2022-08-26T15:25:27+00:00"
},
{
"name": "nikic/fast-route",

View File

@@ -30,20 +30,19 @@ class DockerController
$container = $this->containerDefinitionFetcher->GetContainerById($id);
foreach($container->GetDependsOn() as $dependency) {
$this->PerformRecursiveContainerStart($dependency);
$this->PerformRecursiveContainerStart($dependency, $pullContainer);
}
if ($id === 'nextcloud-aio-database') {
if ($this->dockerActionManager->GetDatabasecontainerExitCode() > 0) {
$pullContainer = false;
error_log('Not pulling the latest database image because the container was not correctly shut down.');
}
}
$this->dockerActionManager->DeleteContainer($container);
$this->dockerActionManager->CreateVolumes($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);
@@ -86,14 +85,17 @@ class DockerController
}
public function StartBackupContainerCheck(Request $request, Response $response, $args) : Response {
$this->checkBackup();
return $response->withStatus(201)->withHeader('Location', '/');
}
public function checkBackup() : void {
$config = $this->configurationManager->GetConfig();
$config['backup-mode'] = 'check';
$this->configurationManager->WriteConfig($config);
$id = 'nextcloud-aio-borgbackup';
$this->PerformRecursiveContainerStart($id);
return $response->withStatus(201)->withHeader('Location', '/');
}
public function StartBackupContainerRestore(Request $request, Response $response, $args) : Response {

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);
// Stop container and start backup check
$dockerController->checkBackup();

View File

@@ -162,11 +162,11 @@ class DockerActionManager
$response = "";
$separator = "\r\n";
$line = strtok($responseBody, $separator);
$response = substr($line, 8) . "\n";
$response = substr($line, 8) . $separator;
while ($line !== false) {
$line = strtok($separator);
$response .= substr($line, 8) . "\n";
$response .= substr($line, 8) . $separator;
}
return $response;

View File

@@ -16,7 +16,7 @@
</header>
<div class="content">
<h1>Nextcloud AIO v2.0.1</h1>
<h1>Nextcloud AIO v2.0.2</h1>
{% set isAnyRunning = false %}
{% set isAnyRestarting = false %}
@@ -538,7 +538,7 @@
<input type="text" name="timezone" placeholder="Europe/Berlin" />
<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" />
<input class="button" type="submit" value="Submit" onclick="return confirm('Are you sure that this is a valid timezone? Please double check by following the wikipedia article and checking the correct column since if not, it will break the startup since the database will not get correctly initialized and you will end in a startup loop.')" />
</form>
You need to make sure that the timezone that you enter is valid. An example is <b>Europe/Berlin</b>. You can get valid values by looking at the 'TZ database name' column of this list: <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List"><b>click here</b></a>.<br><br>
{% else %}

View File

@@ -381,6 +381,7 @@ You can do so by running the `/daily-backup.sh` script that is stored in the mas
- `DAILY_BACKUP` if set to `1`, it will automatically stop the containers and create a backup. If you want to start them again afterwards, you may have a look at the `START_CONTAINERS` option. Please be aware that this option is non-blocking which means that the backup is not done when the process is finished since it only start the borgbackup container with the correct configuration.
- `START_CONTAINERS` if set to `1`, it will automatically start the containers without updating them.
- `STOP_CONTAINERS` if set to `1`, it will automatically stop the containers.
- `CHECK_BACKUP` if set to `1`, it will start the backup check. This is not allowed to be enabled at the same time like `DAILY_BACKUP`.
One example for this would be `sudo docker exec -it -e DAILY_BACKUP=1 nextcloud-aio-mastercontainer /daily-backup.sh`, which you can run via a cronjob or put it in a script.