mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-15 18:20:20 +00:00
Compare commits
18 commits
427f860ea8
...
0db006605a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0db006605a | ||
|
|
2f697b8e53 | ||
|
|
832d9b5ae6 | ||
|
|
2bde893647 | ||
|
|
1a91d6187c | ||
|
|
be1199ace1 | ||
|
|
d425bb226c | ||
|
|
edba082dce | ||
|
|
0d0d43d0cf | ||
|
|
4a7353d9e7 | ||
|
|
386a94494f | ||
|
|
d72181f754 | ||
|
|
0c0f956ea2 | ||
|
|
7634a3887f | ||
|
|
83de526051 | ||
|
|
57306c8cae | ||
|
|
cc41c3465e | ||
|
|
6b3af009e2 |
34 changed files with 110 additions and 81 deletions
2
.github/workflows/codespell.yml
vendored
2
.github/workflows/codespell.yml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v6.0.0
|
||||
uses: actions/checkout@v6.0.1
|
||||
- name: Check spelling
|
||||
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2
|
||||
with:
|
||||
|
|
|
|||
2
.github/workflows/collabora.yml
vendored
2
.github/workflows/collabora.yml
vendored
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
name: update collabora
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- name: Run collabora-profile-update
|
||||
run: |
|
||||
rm -f php/cool-seccomp-profile.json
|
||||
|
|
|
|||
2
.github/workflows/community-containers.yml
vendored
2
.github/workflows/community-containers.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6.0.0
|
||||
uses: actions/checkout@v6.0.1
|
||||
- name: Validate structure
|
||||
run: |
|
||||
CONTAINERS="$(find ./community-containers -mindepth 1 -maxdepth 1 -type d)"
|
||||
|
|
|
|||
2
.github/workflows/dependency-updates.yml
vendored
2
.github/workflows/dependency-updates.yml
vendored
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
name: Run dependency update script
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
||||
with:
|
||||
php-version: 8.4
|
||||
|
|
|
|||
2
.github/workflows/docker-lint.yml
vendored
2
.github/workflows/docker-lint.yml
vendored
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.0
|
||||
uses: actions/checkout@v6.0.1
|
||||
|
||||
- name: Install hadolint
|
||||
run: |
|
||||
|
|
|
|||
2
.github/workflows/helm-release.yml
vendored
2
.github/workflows/helm-release.yml
vendored
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.0
|
||||
uses: actions/checkout@v6.0.1
|
||||
|
||||
- name: Turnstyle
|
||||
uses: softprops/turnstyle@2e4451ef94c5969eee533c487092052d4d1a53af # v2
|
||||
|
|
|
|||
2
.github/workflows/imaginary-update.yml
vendored
2
.github/workflows/imaginary-update.yml
vendored
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
name: update to latest imaginary commit on master branch
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- name: Run imaginary-update
|
||||
run: |
|
||||
# Imaginary
|
||||
|
|
|
|||
2
.github/workflows/json-validator.yml
vendored
2
.github/workflows/json-validator.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6.0.0
|
||||
uses: actions/checkout@v6.0.1
|
||||
- name: Validate Json
|
||||
run: |
|
||||
sudo apt-get update
|
||||
|
|
|
|||
2
.github/workflows/lint-helm.yml
vendored
2
.github/workflows/lint-helm.yml
vendored
|
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.0
|
||||
uses: actions/checkout@v6.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
|
|
|||
2
.github/workflows/lint-php.yml
vendored
2
.github/workflows/lint-php.yml
vendored
|
|
@ -36,7 +36,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@c2d88d3ecc89a9ef08eebf45d9637801dcee7eb5 # v5.0.1
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
|
|
|
|||
2
.github/workflows/nextcloud-update.yml
vendored
2
.github/workflows/nextcloud-update.yml
vendored
|
|
@ -11,7 +11,7 @@ jobs:
|
|||
name: Run nextcloud-update script
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- name: Run nextcloud-update script
|
||||
run: |
|
||||
# Inspired by https://github.com/nextcloud/docker/blob/master/update.sh
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
name: PHP Deprecation Detector
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
||||
with:
|
||||
|
|
|
|||
2
.github/workflows/playwright.yml
vendored
2
.github/workflows/playwright.yml
vendored
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
|
|
|
|||
2
.github/workflows/psalm-update-baseline.yml
vendored
2
.github/workflows/psalm-update-baseline.yml
vendored
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
||||
|
|
|
|||
2
.github/workflows/psalm.yml
vendored
2
.github/workflows/psalm.yml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
name: static-psalm-analysis
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@c2d88d3ecc89a9ef08eebf45d9637801dcee7eb5 # v5.0.1
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
|
|
|
|||
2
.github/workflows/shellcheck.yml
vendored
2
.github/workflows/shellcheck.yml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
name: Check Shell
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- name: Run Shellcheck
|
||||
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0
|
||||
with:
|
||||
|
|
|
|||
2
.github/workflows/talk.yml
vendored
2
.github/workflows/talk.yml
vendored
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
name: update talk
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- name: Run talk-container-update
|
||||
run: |
|
||||
# Recording
|
||||
|
|
|
|||
2
.github/workflows/twig-lint.yml
vendored
2
.github/workflows/twig-lint.yml
vendored
|
|
@ -24,7 +24,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.0
|
||||
uses: actions/checkout@v6.0.1
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
||||
|
|
|
|||
2
.github/workflows/update-copyright.yml
vendored
2
.github/workflows/update-copyright.yml
vendored
|
|
@ -8,4 +8,4 @@ jobs:
|
|||
name: update copyright
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
|
|
|
|||
2
.github/workflows/update-helm.yml
vendored
2
.github/workflows/update-helm.yml
vendored
|
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6.0.0
|
||||
uses: actions/checkout@v6.0.1
|
||||
- name: update helm chart
|
||||
run: |
|
||||
set -x
|
||||
|
|
|
|||
2
.github/workflows/update-yaml.yml
vendored
2
.github/workflows/update-yaml.yml
vendored
|
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6.0.0
|
||||
uses: actions/checkout@v6.0.1
|
||||
- name: update yaml files
|
||||
run: |
|
||||
sudo bash manual-install/update-yaml.sh
|
||||
|
|
|
|||
2
.github/workflows/watchtower-update.yml
vendored
2
.github/workflows/watchtower-update.yml
vendored
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
name: update watchtower
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- name: Run watchtower-container-update
|
||||
run: |
|
||||
# Watchtower
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# syntax=docker/dockerfile:latest
|
||||
# Probably from here https://github.com/elastic/elasticsearch/blob/main/distribution/docker/src/docker/Dockerfile
|
||||
FROM elasticsearch:8.19.7
|
||||
FROM elasticsearch:8.19.8
|
||||
|
||||
USER root
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# syntax=docker/dockerfile:latest
|
||||
FROM golang:1.25.4-alpine3.22 AS go
|
||||
FROM golang:1.25.5-alpine3.22 AS go
|
||||
|
||||
ENV IMAGINARY_HASH=6a274b488759a896aff02f52afee6e50b5e3a3ee
|
||||
|
||||
|
|
|
|||
|
|
@ -75,18 +75,15 @@ elif ! sudo -E -u www-data test -r /var/run/docker.sock; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Check if api version is supported
|
||||
if ! sudo -E -u www-data docker info &>/dev/null; then
|
||||
print_red "Cannot connect to the docker socket. Cannot proceed."
|
||||
echo "Did you maybe remove group read permissions for the docker socket? AIO needs them in order to access the docker socket."
|
||||
echo "If SELinux is enabled on your host, see https://github.com/nextcloud/all-in-one#are-there-known-problems-when-selinux-is-enabled"
|
||||
echo "If you are on TrueNas SCALE, see https://github.com/nextcloud/all-in-one#can-i-run-aio-on-truenas-scale"
|
||||
# Get default docker api version
|
||||
API_VERSION_FILE="$(find ./ -name DockerActionManager.php | head -1)"
|
||||
API_VERSION="$(grep -oP 'const string API_VERSION.*\;' "$API_VERSION_FILE" | grep -oP '[0-9]+.[0-9]+' | head -1)"
|
||||
if [ -z "$API_VERSION" ]; then
|
||||
print_red "Could not get API_VERSION. Something is wrong!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Docker api version check
|
||||
API_VERSION_FILE="$(find ./ -name DockerActionManager.php | head -1)"
|
||||
API_VERSION="$(grep -oP 'const string API_VERSION.*\;' "$API_VERSION_FILE" | grep -oP '[0-9]+.[0-9]+' | head -1)"
|
||||
# Check if DOCKER_API_VERSION is set globally
|
||||
if [ -n "$DOCKER_API_VERSION" ]; then
|
||||
if ! echo "$DOCKER_API_VERSION" | grep -q '^[0-9].[0-9]\+$'; then
|
||||
print_red "You've set DOCKER_API_VERSION but not to an allowed value.
|
||||
|
|
@ -98,23 +95,45 @@ It is set to '$DOCKER_API_VERSION'."
|
|||
print_red "Please note that only v$API_VERSION is officially supported and tested by the maintainers of Nextcloud AIO."
|
||||
print_red "So you run on your own risk and things might break without warning."
|
||||
else
|
||||
# shellcheck disable=SC2001
|
||||
API_VERSION_NUMB="$(echo "$API_VERSION" | sed 's/\.//')"
|
||||
LOCAL_API_VERSION_NUMB="$(sudo -E -u www-data docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')"
|
||||
if [ -n "$LOCAL_API_VERSION_NUMB" ] && [ -n "$API_VERSION_NUMB" ]; then
|
||||
if ! [ "$LOCAL_API_VERSION_NUMB" -ge "$API_VERSION_NUMB" ]; then
|
||||
print_red "Docker API v$API_VERSION is not supported by your docker engine. Cannot proceed. Please upgrade your docker engine if you want to run Nextcloud AIO!"
|
||||
echo "Alternatively, set the DOCKER_API_VERSION environmental variable to a compatible version."
|
||||
echo "However please note that only v$API_VERSION is officially supported and tested by the maintainers of Nextcloud AIO."
|
||||
echo "See https://github.com/nextcloud/all-in-one#how-to-adjust-the-internally-used-docker-api-version"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "LOCAL_API_VERSION_NUMB or API_VERSION_NUMB are not set correctly. Cannot check if the API version is supported."
|
||||
sleep 10
|
||||
# Export docker api version to use it everywhere
|
||||
export DOCKER_API_VERSION="$API_VERSION"
|
||||
fi
|
||||
|
||||
# Set a fallback docker api version. Needed for api version check.
|
||||
# The check will not work otherwise on old docker versions
|
||||
FALLBACK_DOCKER_API_VERSION="1.41"
|
||||
|
||||
# Check if docker info can be used
|
||||
if ! sudo -E -u www-data docker info &>/dev/null; then
|
||||
if ! sudo -E -u www-data DOCKER_API_VERSION="$FALLBACK_DOCKER_API_VERSION" docker info &>/dev/null; then
|
||||
print_red "Cannot connect to the docker socket. Cannot proceed."
|
||||
echo "Did you maybe remove group read permissions for the docker socket? AIO needs them in order to access the docker socket."
|
||||
echo "If SELinux is enabled on your host, see https://github.com/nextcloud/all-in-one#are-there-known-problems-when-selinux-is-enabled"
|
||||
echo "If you are on TrueNas SCALE, see https://github.com/nextcloud/all-in-one#can-i-run-aio-on-truenas-scale"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Docker api version check
|
||||
# shellcheck disable=SC2001
|
||||
API_VERSION_NUMB="$(echo "$API_VERSION" | sed 's/\.//')"
|
||||
LOCAL_API_VERSION_NUMB="$(sudo -E -u www-data docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')"
|
||||
if [ -z "$LOCAL_API_VERSION_NUMB" ]; then
|
||||
LOCAL_API_VERSION_NUMB="$(sudo -E -u www-data DOCKER_API_VERSION="$FALLBACK_DOCKER_API_VERSION" docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')"
|
||||
fi
|
||||
if [ -n "$LOCAL_API_VERSION_NUMB" ] && [ -n "$API_VERSION_NUMB" ]; then
|
||||
if ! [ "$LOCAL_API_VERSION_NUMB" -ge "$API_VERSION_NUMB" ]; then
|
||||
print_red "Docker API v$API_VERSION is not supported by your docker engine. Cannot proceed. Please upgrade your docker engine if you want to run Nextcloud AIO!"
|
||||
echo "Alternatively, set the DOCKER_API_VERSION environmental variable to a compatible version."
|
||||
echo "However please note that only v$API_VERSION is officially supported and tested by the maintainers of Nextcloud AIO."
|
||||
echo "See https://github.com/nextcloud/all-in-one#how-to-adjust-the-internally-used-docker-api-version"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "LOCAL_API_VERSION_NUMB or API_VERSION_NUMB are not set correctly. Cannot check if the API version is supported."
|
||||
sleep 10
|
||||
fi
|
||||
|
||||
# Check Storage drivers
|
||||
STORAGE_DRIVER="$(sudo -E -u www-data docker info | grep "Storage Driver")"
|
||||
# Check if vfs is used: https://github.com/nextcloud/all-in-one/discussions/1467
|
||||
|
|
|
|||
|
|
@ -7,3 +7,11 @@ if (getenv('NEXTCLOUD_TRUSTED_CERTIFICATES_POSTGRES')) {
|
|||
),
|
||||
);
|
||||
}
|
||||
if (getenv('NEXTCLOUD_TRUSTED_CERTIFICATES_MYSQL')) {
|
||||
$CONFIG = array(
|
||||
'dbdriveroptions' => array(
|
||||
'PDO::MYSQL_ATTR_SSL_CA' => '/var/www/html/data/certificates/MYSQL',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -283,6 +283,10 @@ EOF
|
|||
if [ -n "$NEXTCLOUD_TRUSTED_CERTIFICATES_POSTGRES" ]; then
|
||||
mkdir /var/www/html/data/certificates
|
||||
echo "$NEXTCLOUD_TRUSTED_CERTIFICATES_POSTGRES" > "/var/www/html/data/certificates/POSTGRES"
|
||||
# Write out mysql root cert
|
||||
elif [ -n "$NEXTCLOUD_TRUSTED_CERTIFICATES_MYSQL" ]; then
|
||||
mkdir /var/www/html/data/certificates
|
||||
echo "$NEXTCLOUD_TRUSTED_CERTIFICATES_MYSQL" > "/var/www/html/data/certificates/MYSQL"
|
||||
fi
|
||||
|
||||
echo "Installing with $DATABASE_TYPE database"
|
||||
|
|
|
|||
|
|
@ -68,11 +68,14 @@ fi
|
|||
|
||||
# Postgres root cert
|
||||
if [ -f "/nextcloud/data/certificates/POSTGRES" ]; then
|
||||
POSTGRES_CERT="?sslmode=verify-ca&sslrootcert=/nextcloud/data/certificates/POSTGRES"
|
||||
CERT_OPTIONS="?sslmode=verify-ca&sslrootcert=/nextcloud/data/certificates/POSTGRES"
|
||||
# Mysql root cert
|
||||
elif [ -f "/nextcloud/data/certificates/MYSQL" ]; then
|
||||
CERT_OPTIONS="?sslmode=verify-ca&ssl-ca=/nextcloud/data/certificates/MYSQL"
|
||||
fi
|
||||
|
||||
# Set sensitive values as env
|
||||
export DATABASE_URL="$DATABASE_TYPE://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB$POSTGRES_CERT"
|
||||
export DATABASE_URL="$DATABASE_TYPE://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB$CERT_OPTIONS"
|
||||
export REDIS_URL="redis://$REDIS_USER:$REDIS_HOST_PASSWORD@$REDIS_HOST/$REDIS_DB_INDEX"
|
||||
|
||||
# Run it
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# syntax=docker/dockerfile:latest
|
||||
FROM golang:1.25.4-alpine3.22 AS go
|
||||
FROM golang:1.25.5-alpine3.22 AS go
|
||||
|
||||
ENV WATCHTOWER_COMMIT_HASH=6c5a1b0bea65cea1d4cc1de5196789a01617957a
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ This container bundles caddy and auto-configures it for you. It also covers [vau
|
|||
|
||||
### Notes
|
||||
- This container is incompatible with the [npmplus](https://github.com/nextcloud/all-in-one/tree/main/community-containers/npmplus) community container. So make sure that you do not enable both at the same time!
|
||||
- Make sure that no other service is using port 443 on your host as otherwise the containers will fail to start. You can check this with `sudo netstat -tulpn | grep 443` before installing AIO.
|
||||
- Make sure that no other service is using port 443/tcp on your host as otherwise the containers will fail to start. You can check this with `sudo netstat -tulpn | grep 443` before installing AIO.
|
||||
- Starting with AIO v12, the Talk port that was usually exposed on port 3478 is now set to port 443 udp and tcp and reachable via `your-nc-domain.com`. For the changes to become activated, you need to go to `https://your-nc-domain.com/settings/admin/talk` and delete all turn and stun servers. Then restart the containers and the new config should become active.
|
||||
- Starting with AIO v12, you can also limit vaultwarden, stalwart and lldap to certain ip-addresses. You can do so by creating a `allowed-IPs-vaultwarden.txt`, `allowed-IPs-stalwart.txt`, or `allowed-IPs-lldap.txt` file in the `nextcloud-aio-caddy` directory of your admin user and adding the ip-addresses in these files.
|
||||
- The container also supports the proxy protocol inside caddy. That means that you can run a supported web server in front of port 443/tcp and use the proxy protocol. You can enable this by configuring the `APACHE_IP_BINDING` environmental variable for the mastercontainer and set it to an ip-address from which the protocol shall be accepted. ⚠️ Note that the initial domain validation will not work correctly if you want to use the proxy protocol. So make sure to skip the domain validation in that case. See the [documentation](https://github.com/nextcloud/all-in-one#how-to-skip-the-domain-validation).
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ $app->get('/containers', function (Request $request, Response $response, array $
|
|||
'is_backup_container_running' => $dockerActionManger->isBackupContainerRunning(),
|
||||
'backup_exit_code' => $dockerActionManger->GetBackupcontainerExitCode(),
|
||||
'is_instance_restore_attempt' => $configurationManager->isInstanceRestoreAttempt(),
|
||||
'borg_backup_mode' => $configurationManager->GetBorgBackupMode(),
|
||||
'borg_backup_mode' => $configurationManager->GetBackupMode(),
|
||||
'was_start_button_clicked' => $configurationManager->wasStartButtonClicked(),
|
||||
'has_update_available' => $dockerActionManger->isAnyUpdateAvailable(),
|
||||
'last_backup_time' => $configurationManager->GetLastBackupTime(),
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ readonly class ConfigurationController {
|
|||
}
|
||||
|
||||
if (isset($request->getParsedBody()['delete_borg_backup_location_vars'])) {
|
||||
$this->configurationManager->DeleteBorgBackupLocationVars();
|
||||
$this->configurationManager->DeleteBorgBackupLocationItems();
|
||||
}
|
||||
|
||||
return $response->withStatus(201)->withHeader('Location', '.');
|
||||
|
|
|
|||
|
|
@ -89,9 +89,7 @@ readonly class DockerController {
|
|||
}
|
||||
|
||||
public function startBackup(bool $forceStopNextcloud = false) : void {
|
||||
$config = $this->configurationManager->GetConfig();
|
||||
$config['backup-mode'] = 'backup';
|
||||
$this->configurationManager->WriteConfig($config);
|
||||
$this->configurationManager->SetBackupMode('backup');
|
||||
|
||||
$id = self::TOP_CONTAINER;
|
||||
$this->PerformRecursiveContainerStop($id, $forceStopNextcloud);
|
||||
|
|
@ -111,26 +109,22 @@ readonly class DockerController {
|
|||
}
|
||||
|
||||
public function checkBackup() : void {
|
||||
$config = $this->configurationManager->GetConfig();
|
||||
$config['backup-mode'] = 'check';
|
||||
$this->configurationManager->WriteConfig($config);
|
||||
$this->configurationManager->SetBackupMode('check');
|
||||
|
||||
$id = 'nextcloud-aio-borgbackup';
|
||||
$this->PerformRecursiveContainerStart($id);
|
||||
}
|
||||
|
||||
private function listBackup() : void {
|
||||
$config = $this->configurationManager->GetConfig();
|
||||
$config['backup-mode'] = 'list';
|
||||
$this->configurationManager->WriteConfig($config);
|
||||
private function listBackup() : void {
|
||||
$this->configurationManager->SetBackupMode('list');
|
||||
|
||||
$id = 'nextcloud-aio-borgbackup';
|
||||
$this->PerformRecursiveContainerStart($id);
|
||||
}
|
||||
|
||||
public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response {
|
||||
$this->configurationManager->SetBackupMode('restore');
|
||||
$config = $this->configurationManager->GetConfig();
|
||||
$config['backup-mode'] = 'restore';
|
||||
$config['selected-restore-time'] = $request->getParsedBody()['selected_restore_time'] ?? '';
|
||||
if (isset($request->getParsedBody()['restore-exclude-previews'])) {
|
||||
$config['restore-exclude-previews'] = 1;
|
||||
|
|
@ -150,24 +144,20 @@ readonly class DockerController {
|
|||
}
|
||||
|
||||
public function StartBackupContainerCheckRepair(Request $request, Response $response, array $args) : Response {
|
||||
$config = $this->configurationManager->GetConfig();
|
||||
$config['backup-mode'] = 'check-repair';
|
||||
$this->configurationManager->WriteConfig($config);
|
||||
$this->configurationManager->SetBackupMode('check-repair');
|
||||
|
||||
$id = 'nextcloud-aio-borgbackup';
|
||||
$this->PerformRecursiveContainerStart($id);
|
||||
|
||||
// Restore to backup check which is needed to make the UI logic work correctly
|
||||
$config = $this->configurationManager->GetConfig();
|
||||
$config['backup-mode'] = 'check';
|
||||
$this->configurationManager->WriteConfig($config);
|
||||
$this->configurationManager->SetBackupMode('check');
|
||||
|
||||
return $response->withStatus(201)->withHeader('Location', '.');
|
||||
}
|
||||
|
||||
public function StartBackupContainerTest(Request $request, Response $response, array $args) : Response {
|
||||
$this->configurationManager->SetBackupMode('test');
|
||||
$config = $this->configurationManager->GetConfig();
|
||||
$config['backup-mode'] = 'test';
|
||||
$config['instance_restore_attempt'] = 0;
|
||||
$this->configurationManager->WriteConfig($config);
|
||||
|
||||
|
|
|
|||
|
|
@ -426,6 +426,12 @@ class ConfigurationManager
|
|||
return $config['backup-mode'];
|
||||
}
|
||||
|
||||
public function SetBackupMode(string $mode) : void {
|
||||
$config = $this->GetConfig();
|
||||
$config['backup-mode'] = $mode;
|
||||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
public function GetSelectedRestoreTime() : string {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['selected-restore-time'])) {
|
||||
|
|
@ -506,11 +512,19 @@ class ConfigurationManager
|
|||
}
|
||||
}
|
||||
|
||||
public function DeleteBorgBackupLocationVars() : void {
|
||||
public function DeleteBorgBackupLocationItems() : void {
|
||||
// Delete the variables
|
||||
$config = $this->GetConfig();
|
||||
$config['borg_backup_host_location'] = '';
|
||||
$config['borg_remote_repo'] = '';
|
||||
$this->WriteConfig($config);
|
||||
|
||||
// Also delete the borg config file to be able to start over
|
||||
if (file_exists(DataConst::GetBackupKeyFile())) {
|
||||
if (unlink(DataConst::GetBackupKeyFile())) {
|
||||
error_log('borg.config file deleted to be able to start over.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -667,15 +681,6 @@ class ConfigurationManager
|
|||
return false;
|
||||
}
|
||||
|
||||
public function GetBorgBackupMode() : string {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['backup-mode'])) {
|
||||
$config['backup-mode'] = '';
|
||||
}
|
||||
|
||||
return $config['backup-mode'];
|
||||
}
|
||||
|
||||
public function GetNextcloudMount() : string {
|
||||
$envVariableName = 'NEXTCLOUD_MOUNT';
|
||||
$configName = 'nextcloud_mount';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue