Compare commits

..

2 Commits

15 changed files with 36 additions and 20 deletions

View File

@@ -10,7 +10,7 @@
}
log {
level ERROR
level {$CADDY_LOG_LEVEL}
}
}

View File

@@ -9,6 +9,8 @@ if [ -z "$NC_DOMAIN" ]; then
exit 1
fi
CADDY_LOG_LEVEL="$(echo "$AIO_LOG_LEVEL" | tr '[:lower:]' '[:upper:]')"
export CADDY_LOG_LEVEL
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
export SUPERVISORD_STDOUT=/dev/stdout
else

View File

@@ -6,8 +6,6 @@ fi
if [ "$AIO_LOG_LEVEL" = "warn" ]; then
COLLABORA_LOG_LEVEL="warning"
elif [ "$AIO_LOG_LEVEL" = "info" ]; then
COLLABORA_LOG_LEVEL="notice"
else
COLLABORA_LOG_LEVEL="$AIO_LOG_LEVEL"
fi

View File

@@ -10,7 +10,7 @@
}
log {
level ERROR
level {$CADDY_LOG_LEVEL}
# We need to exclude the remote-host plugin from logging as it would spam the logs
# See https://github.com/nextcloud/all-in-one/pull/7006#issuecomment-4003238239
exclude http.matchers.remote_host

View File

@@ -9,7 +9,7 @@
}
log {
level ERROR
level {$CADDY_LOG_LEVEL}
# We need to exclude the remote-host plugin from logging as it would spam the logs
# See https://github.com/nextcloud/all-in-one/pull/7006#issuecomment-4003238239
exclude http.matchers.remote_host

View File

@@ -347,11 +347,13 @@ if [ -z "$AIO_LOG_LEVEL" ]; then
export AIO_LOG_LEVEL="warn"
fi
CADDY_LOG_LEVEL="$(echo "$AIO_LOG_LEVEL" | tr '[:lower:]' '[:upper:]')"
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
export SUPERVISORD_STDOUT=/dev/stdout
else
export SUPERVISORD_STDOUT=NONE
fi
export CADDY_LOG_LEVEL
# Check if ghcr.io is reachable
# Solves issues like https://github.com/nextcloud/all-in-one/discussions/5268

View File

@@ -8,7 +8,7 @@ ENV SOURCE_LOCATION=/usr/src/nextcloud
ENV REDIS_DB_INDEX=0
# AIO settings start # Do not remove or change this line!
ENV NEXTCLOUD_VERSION=33.0.3
ENV NEXTCLOUD_VERSION=33.0.2
ENV AIO_TOKEN=123456
ENV AIO_URL=localhost
# AIO settings end # Do not remove or change this line!

View File

@@ -671,7 +671,6 @@ fi
# Adjusting log files to be stored on a volume
echo "Adjusting log files..."
php /var/www/html/occ config:system:set upgrade.cli-upgrade-link --value="https://github.com/nextcloud/all-in-one/discussions/2726"
php /var/www/html/occ config:system:set loglevel --value="$NEXTCLOUD_LOG_LEVEL" --type=integer
if [ "$NEXTCLOUD_LOG_TYPE" = "errorlog" ]; then
php /var/www/html/occ config:system:set log_type --value="errorlog"
php /var/www/html/occ config:system:set log_type_audit --value="errorlog"

View File

@@ -14,7 +14,6 @@ RUN set -ex; \
bash \
openssl \
shadow \
netcat-openbsd \
grep; \
\
# We need to use the same gid and uid as on old installations

View File

@@ -6,9 +6,6 @@ fi
test -f "/mnt/data/backup-is-running" && exit 0
# If database import is running, do not continue with the health check
if nc -z 127.0.0.1 11000; then
exit 0
fi
PGPASSWORD="$POSTGRES_PASSWORD" psql -h 127.0.0.1 -p 11000 -U "oc_$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()" && exit 0
PGPASSWORD="$POSTGRES_PASSWORD" psql -h 127.0.0.1 -p 5432 -U "oc_$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()" || exit 1

View File

@@ -4,11 +4,8 @@ if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
set -x
fi
# Redis only supports [debug, verbose, notice, warning, nothing] as log level
if [ "$AIO_LOG_LEVEL" = "warn" ] || [ "$AIO_LOG_LEVEL" = "error" ]; then
if [ "$AIO_LOG_LEVEL" = "warn" ]; then
REDIS_LOG_LEVEL="warning"
elif [ "$AIO_LOG_LEVEL" = "info" ]; then
REDIS_LOG_LEVEL="notice"
else
REDIS_LOG_LEVEL="$AIO_LOG_LEVEL"
fi

View File

@@ -100,7 +100,7 @@ sed -i 's|NC_DOMAIN=|NC_DOMAIN=yourdomain.com # TODO! Needs to be chang
sed -i 's|NEXTCLOUD_PASSWORD=|NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin".|' sample.conf
sed -i 's|TIMEZONE=|TIMEZONE=Europe/Berlin # TODO! This is the timezone that your containers will use.|' sample.conf
sed -i 's|COLLABORA_SECCOMP_POLICY=|COLLABORA_SECCOMP_POLICY=--o:security.seccomp=true # Changing the value to false allows to disable the seccomp feature of the Collabora container.|' sample.conf
sed -i 's|AIO_LOG_LEVEL=|AIO_LOG_LEVEL=warn # Allows to adjust the global AIO log level. Valid values are debug, info, warn and error.|' sample.conf
sed -i 's|AIO_LOG_LEVEL=|AIO_LOG_LEVEL=warning # Allows to adjust the global AIO log level. Valid values are debug, info, warn and error.|' sample.conf
sed -i 's|FULLTEXTSEARCH_JAVA_OPTIONS=|FULLTEXTSEARCH_JAVA_OPTIONS="-Xms512M -Xmx512M" # Allows to adjust the fulltextsearch java options.|' sample.conf
sed -i 's|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="deck twofactor_totp tasks calendar contacts notes" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. You can also disable apps by using a hyphen in front of them. E.g. "-app_api"|' sample.conf
sed -i 's|NEXTCLOUD_ADDITIONAL_APKS=|NEXTCLOUD_ADDITIONAL_APKS=imagemagick # This allows to add additional packages to the Nextcloud container permanently. Default is imagemagick but can be overwritten by modifying this value.|' sample.conf

View File

@@ -105,6 +105,7 @@ $app->post('/api/docker/restore', AIO\Controller\DockerController::class . ':Sta
$app->post('/api/docker/stop', AIO\Controller\DockerController::class . ':StopContainer');
$app->post('/api/docker/backup-reset-location', AIO\Controller\DockerController::class . ':DeleteBorgBackupConfig');
$app->post('/api/docker/prune', AIO\Controller\DockerController::class . ':SystemPrune');
$app->post('/api/docker/pull-images', AIO\Controller\DockerController::class . ':PullImages');
$app->get('/api/docker/logs', AIO\Controller\DockerController::class . ':GetLogs');
$app->post('/api/auth/login', AIO\Controller\LoginController::class . ':TryLogin');
$app->get('/api/auth/getlogin', AIO\Controller\LoginController::class . ':GetTryLogin');

View File

@@ -45,15 +45,15 @@ readonly class DockerController {
$this->dockerActionManager->ConnectContainerToNetwork($container);
}
private function PerformRecursiveImagePull(string $id) : void {
private function PerformRecursiveImagePull(string $id, ?\Closure $addToStreamingResponseBody = null) : void {
$container = $this->containerDefinitionFetcher->GetContainerById($id);
// Pull all dependencies first and then itself
foreach($container->dependsOn as $dependency) {
$this->PerformRecursiveImagePull($dependency);
$this->PerformRecursiveImagePull($dependency, $addToStreamingResponseBody);
}
$this->dockerActionManager->PullImage($container, true);
$this->dockerActionManager->PullImage($container, true, $addToStreamingResponseBody);
}
public function PullAllContainerImages(): void {
@@ -63,6 +63,19 @@ readonly class DockerController {
$this->PerformRecursiveImagePull($id);
}
public function PullImages(Request $request, Response $response, array $args) : Response {
// Get streaming response start and closure
$nonbufResp = $this->startStreamingResponse($response);
$addToStreamingResponseBody = $this->getAddToStreamingResponseBody($nonbufResp);
$id = self::TOP_CONTAINER;
$this->PerformRecursiveImagePull($id, $addToStreamingResponseBody);
// End streaming response
$this->finalizeStreamingResponse($nonbufResp);
return $nonbufResp;
}
public function GetLogs(Request $request, Response $response, array $args) : Response
{
$requestParams = $request->getQueryParams();

View File

@@ -291,6 +291,14 @@
{% if has_update_available == true %}
{% if is_mastercontainer_update_available == false %}
<p>⚠️ Container updates are available. Click on <strong>Stop containers</strong> and <strong>Start and update containers</strong> to update them. You should consider creating a backup first.</p>
{% if isAnyRunning == true and isApacheStarting != true %}
<p>Alternatively, you can already pull the new images now while the containers are still running. Depending on your internet connection and image sizes, this can take a few minutes. The new images will automatically be used whenever the containers are recreated either manually via <strong>Stop containers</strong> + <strong>Start and update containers</strong>, or automatically via AIO's daily backup/update schedule.</p>
<form method="POST" action="api/docker/pull-images" target="overlay-log">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="submit" value="Pull new images" />
</form>
{% endif %}
{% endif %}
{% else %}
{% if is_mastercontainer_update_available == false %}