Compare commits

...

34 Commits

Author SHA1 Message Date
Simon L
75784dc736 Merge pull request #3804 from nextcloud/enh/noid/publish-helm-dev 2023-11-23 10:57:03 +01:00
Simon L
42ddbfde34 helm - publish new dev release
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-23 10:53:07 +01:00
Simon L
f577221fa7 elasticsearch 8.11.1 is still not available for arm64
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-23 10:50:32 +01:00
Simon L
6fe494cc9f Merge pull request #3795 from nextcloud/enh/noid/define-additional-trusted-proxy 2023-11-23 10:44:59 +01:00
Simon L
8b39a5ec73 Merge pull request #3774 from nextcloud/enh/3769/make-pull-image-failure-proof 2023-11-23 10:10:55 +01:00
Simon L
8c17fa0a7c Merge pull request #3775 from nextcloud/dependabot/docker/Containers/clamav/clamav/clamav-1.2.1-16
Bump clamav/clamav from 1.2.1-15 to 1.2.1-16 in /Containers/clamav
2023-11-23 09:53:34 +01:00
Simon L
aae79af1b5 Merge pull request #3773 from nextcloud/enh/noid/rename-pullcontainer
rename pullContainer to pullImage
2023-11-23 09:53:04 +01:00
Simon L
907dca670e Merge pull request #3765 from nextcloud/dependabot/docker/Containers/fulltextsearch/elasticsearch-8.11.1
Bump elasticsearch from 8.11.0 to 8.11.1 in /Containers/fulltextsearch
2023-11-23 09:51:44 +01:00
Simon L
66c90e976f Merge pull request #3776 from nextcloud/dependabot/docker/Containers/docker-socket-proxy/haproxy-2.8.4-alpine3.18
Bump haproxy from 2.8.3-alpine3.18 to 2.8.4-alpine3.18 in /Containers/docker-socket-proxy
2023-11-23 09:51:19 +01:00
Simon L
c67bd8f7db Merge pull request #3781 from nextcloud/enh/noid/collabora-mknod
add mknod capability to collabora
2023-11-23 09:50:47 +01:00
Simon L
e1019ee9ff Merge pull request #3799 from nextcloud/aio-dependency-update
PHP dependency updates
2023-11-23 09:50:14 +01:00
Simon L
0b23271af0 Merge pull request #3801 from nextcloud/automated/noid/psalm-baseline-update
[Automated] Update psalm-baseline.xml
2023-11-23 09:49:24 +01:00
Simon L
53d5191da7 Merge pull request #3786 from nextcloud/aio-helm-update
Helm Chart updates
2023-11-23 09:46:49 +01:00
szaimen
95850d30bb Helm Chart updates
Signed-off-by: GitHub <noreply@github.com>
2023-11-23 08:45:28 +00:00
nextcloud-command
92664f7964 Update psalm baseline
Signed-off-by: GitHub <noreply@github.com>
2023-11-23 04:09:07 +00:00
szaimen
4e3b93da82 php dependency updates
Signed-off-by: GitHub <noreply@github.com>
2023-11-22 12:02:17 +00:00
Simon L
25c5b3dd65 helm - add namespace to different section
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-21 19:10:06 +01:00
Simon L
89a87d8b60 helm - allow to define an additional_trusted_proxy
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-21 17:34:37 +01:00
Simon L
5a385ebdd3 Merge pull request #3784 from nextcloud/enh/noid/fix-clamav 2023-11-21 16:41:09 +01:00
Simon L
feec123292 fix clamav permissions
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-21 12:07:05 +01:00
Simon L
ec33279209 Merge pull request #3783 from nextcloud/st3iny-patch-1 2023-11-21 11:45:30 +01:00
Simon L
e20f31ab90 address some other details
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-21 11:44:17 +01:00
Richard Steinmetz
98e671403c helm: fix duplicate SMTP_HOST env variable
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2023-11-21 11:38:08 +01:00
Simon L
5ed71e8a88 add mknod capability to collabora
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-21 09:11:31 +01:00
Simon L
ebbc68e4e5 add section how to connect to database
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-20 15:09:03 +01:00
dependabot[bot]
f7ea98ef24 Bump haproxy in /Containers/docker-socket-proxy
Bumps haproxy from 2.8.3-alpine3.18 to 2.8.4-alpine3.18.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 13:08:42 +00:00
Simon L
10a8f5b099 Make sure that image is correctly pulled before continuing
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-20 14:05:40 +01:00
dependabot[bot]
2d2d7a2e7a Bump clamav/clamav from 1.2.1-15 to 1.2.1-16 in /Containers/clamav
Bumps clamav/clamav from 1.2.1-15 to 1.2.1-16.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 12:44:59 +00:00
Simon L
01625b1b7a fix removing THIS_IS_AIO
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-20 13:29:19 +01:00
Simon L
f935993ac6 rename pullContainer to pullImage
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-20 13:16:59 +01:00
dependabot[bot]
db0c20584d Bump elasticsearch from 8.11.0 to 8.11.1 in /Containers/fulltextsearch
Bumps elasticsearch from 8.11.0 to 8.11.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-17 12:33:42 +00:00
Simon L
03aa7a1ce1 name loadbalancer ports in a different way for a test
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-17 11:03:03 +01:00
Simon L
57b5f61f5b Merge pull request #3760 from nextcloud/enh/noid/create-beta-helm-chart 2023-11-16 21:38:27 +01:00
Simon L
0714ea0234 helm chart - create beta release
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-16 21:36:08 +01:00
25 changed files with 184 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
# Probably from this file: https://github.com/Cisco-Talos/clamav-docker/blob/main/clamav/1.1/alpine/Dockerfile
FROM clamav/clamav:1.2.1-15
FROM clamav/clamav:1.2.1-16
COPY clamav.conf /tmp/clamav.conf

View File

@@ -1,4 +1,4 @@
FROM haproxy:2.8.3-alpine3.18
FROM haproxy:2.8.4-alpine3.18
# hadolint ignore=DL3002
USER root

View File

@@ -516,6 +516,9 @@ fi
chmod 775 -R /var/www/html/custom_apps/notify_push/bin/
php /var/www/html/occ config:system:set trusted_proxies 0 --value="127.0.0.1"
php /var/www/html/occ config:system:set trusted_proxies 1 --value="::1"
if [ -n "$ADDITIONAL_TRUSTED_PROXY" ]; then
php /var/www/html/occ config:system:set trusted_proxies 2 --value="$ADDITIONAL_TRUSTED_PROXY"
fi
php /var/www/html/occ config:app:set notify_push base_endpoint --value="https://$NC_DOMAIN/push"
# Collabora
@@ -561,6 +564,11 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then
if ! echo "$COLLABORA_ALLOW_LIST" | grep -q "$PRIVATE_IP_RANGES"; then
COLLABORA_ALLOW_LIST+=",$PRIVATE_IP_RANGES"
fi
if [ -n "$ADDITIONAL_TRUSTED_PROXY" ]; then
if ! echo "$COLLABORA_ALLOW_LIST" | grep -q "$ADDITIONAL_TRUSTED_PROXY"; then
COLLABORA_ALLOW_LIST+=",$ADDITIONAL_TRUSTED_PROXY"
fi
fi
php /var/www/html/occ config:app:set richdocuments wopi_allowlist --value="$COLLABORA_ALLOW_LIST"
else
echo "Warning: wopi_allowlist is empty which should not be the case!"

View File

@@ -38,3 +38,6 @@ This is documented here: https://github.com/nextcloud-releases/all-in-one/tree/m
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`.
## How to connect to the database?
Simply run `sudo docker exec -it nextcloud-aio-database psql -U oc_nextcloud nextcloud_database` and you should be in.

View File

@@ -32,7 +32,7 @@ echo "$OUTPUT" | yq -P > ./manual-install/containers.yml
cd manual-install || exit
sed -i "s|'||g" containers.yml
sed -i '/display_name:/d' containers.yml
sed -i '/THIS_IS_AIO:/d' containers.yml
sed -i '/THIS_IS_AIO/d' containers.yml
sed -i '/stop_grace_period:/s/$/s/' containers.yml
sed -i '/: \[\]/d' containers.yml
sed -i 's|- source: |- |' containers.yml

View File

@@ -1,6 +1,6 @@
name: nextcloud-aio-helm-chart
description: A generated Helm Chart for Nextcloud AIO from Skippbox Kompose
version: 7.6.2
version: 7.7.1-dev
apiVersion: v2
keywords:
- latest

View File

@@ -57,7 +57,7 @@ spec:
value: nextcloud-aio-talk
- name: TZ
value: "{{ .Values.TIMEZONE }}"
image: nextcloud/aio-apache:20231113_125854-latest
image: nextcloud/aio-apache:20231123_084113-latest
name: nextcloud-aio-apache
ports:
- containerPort: {{ .Values.APACHE_PORT }}

View File

@@ -24,11 +24,22 @@ spec:
io.kompose.service: nextcloud-aio-clamav
spec:
initContainers:
- name: init-subpath
image: alpine
command:
- mkdir
- "-p"
- /nextcloud-aio-clamav/data
- /nextcloud-aio-clamav
volumeMounts:
- name: nextcloud-aio-clamav
mountPath: /nextcloud-aio-clamav
- name: init-volumes
image: alpine
command:
- chmod
- "777"
- chown
- 100:100
- "-R"
- /nextcloud-aio-clamav
volumeMounts:
- name: nextcloud-aio-clamav
@@ -39,13 +50,14 @@ spec:
value: "90"
- name: TZ
value: "{{ .Values.TIMEZONE }}"
image: nextcloud/aio-clamav:20231113_125854-latest
image: nextcloud/aio-clamav:20231123_084113-latest
name: nextcloud-aio-clamav
ports:
- containerPort: 3310
protocol: TCP
volumeMounts:
- mountPath: /var/lib/clamav
subPath: data
name: nextcloud-aio-clamav
volumes:
- name: nextcloud-aio-clamav

View File

@@ -37,7 +37,7 @@ spec:
value: --o:ssl.enable=false --o:ssl.termination=true --o:mount_jail_tree=false --o:logging.level=warning --o:home_mode.enable=true {{ .Values.COLLABORA_SECCOMP_POLICY }} --o:remote_font_config.url=https://{{ .Values.NC_DOMAIN }}/apps/richdocuments/settings/fonts.json
- name: server_name
value: "{{ .Values.NC_DOMAIN }}"
image: nextcloud/aio-collabora:20231113_125854-latest
image: nextcloud/aio-collabora:20231123_084113-latest
name: nextcloud-aio-collabora
ports:
- containerPort: 9980

View File

@@ -61,7 +61,7 @@ spec:
value: nextcloud
- name: TZ
value: "{{ .Values.TIMEZONE }}"
image: nextcloud/aio-postgresql:20231113_125854-latest
image: nextcloud/aio-postgresql:20231123_084113-latest
name: nextcloud-aio-database
ports:
- containerPort: 5432

View File

@@ -55,7 +55,7 @@ spec:
value: basic
- name: xpack.security.enabled
value: "false"
image: nextcloud/aio-fulltextsearch:20231113_125854-latest
image: nextcloud/aio-fulltextsearch:20231123_084113-latest
name: nextcloud-aio-fulltextsearch
ports:
- containerPort: 9200

View File

@@ -27,7 +27,7 @@ spec:
- env:
- name: TZ
value: "{{ .Values.TIMEZONE }}"
image: nextcloud/aio-imaginary:20231113_125854-latest
image: nextcloud/aio-imaginary:20231123_084113-latest
name: nextcloud-aio-imaginary
ports:
- containerPort: 9000

View File

@@ -37,8 +37,6 @@ spec:
mountPath: /nextcloud-aio-nextcloud
containers:
- env:
- name: SMTP_HOST
value: "{{ .Values.SMTP_HOST }}"
- name: SMTP_HOST
value: "{{ .Values.SMTP_HOST }}"
- name: SMTP_SECURE
@@ -145,7 +143,8 @@ spec:
value: "{{ .Values.TIMEZONE }}"
- name: UPDATE_NEXTCLOUD_APPS
value: "{{ .Values.UPDATE_NEXTCLOUD_APPS }}"
image: nextcloud/aio-nextcloud:20231113_125854-latest
image: nextcloud/aio-nextcloud:develop
imagePullPolicy: Always
name: nextcloud-aio-nextcloud
ports:
- containerPort: 9000

View File

@@ -50,7 +50,7 @@ spec:
value: nextcloud-aio-redis
- name: REDIS_HOST_PASSWORD
value: "{{ .Values.REDIS_PASSWORD }}"
image: nextcloud/aio-notify-push:20231113_125854-latest
image: nextcloud/aio-notify-push:20231123_084113-latest
name: nextcloud-aio-notify-push
ports:
- containerPort: 7867

View File

@@ -43,7 +43,7 @@ spec:
value: "{{ .Values.ONLYOFFICE_SECRET }}"
- name: TZ
value: "{{ .Values.TIMEZONE }}"
image: nextcloud/aio-onlyoffice:20231113_125854-latest
image: nextcloud/aio-onlyoffice:20231123_084113-latest
name: nextcloud-aio-onlyoffice
ports:
- containerPort: 80

View File

@@ -38,7 +38,7 @@ spec:
value: "{{ .Values.REDIS_PASSWORD }}"
- name: TZ
value: "{{ .Values.TIMEZONE }}"
image: nextcloud/aio-redis:20231113_125854-latest
image: nextcloud/aio-redis:20231123_084113-latest
name: nextcloud-aio-redis
ports:
- containerPort: 6379

View File

@@ -37,7 +37,7 @@ spec:
value: "{{ .Values.TURN_SECRET }}"
- name: TZ
value: "{{ .Values.TIMEZONE }}"
image: nextcloud/aio-talk:20231113_125854-latest
image: nextcloud/aio-talk:20231123_084113-latest
name: nextcloud-aio-talk
ports:
- containerPort: {{ .Values.TALK_PORT }}

View File

@@ -33,7 +33,7 @@ spec:
value: "{{ .Values.RECORDING_SECRET }}"
- name: TZ
value: "{{ .Values.TIMEZONE }}"
image: nextcloud/aio-talk-recording:20231113_125854-latest
image: nextcloud/aio-talk-recording:20231123_084113-latest
name: nextcloud-aio-talk-recording
ports:
- containerPort: 1234

View File

@@ -81,15 +81,34 @@ cat << EOL > /tmp/initcontainers.database
- "-R"
volumeMountsInitContainer:
EOL
cat << EOL > /tmp/initcontainers.clamav
initContainers:
- name: init-subpath
image: alpine
command:
- mkdir
- "-p"
- /nextcloud-aio-clamav/data
volumeMountsInitContainer:
- name: init-volumes
image: alpine
command:
- chown
- 100:100
- "-R"
volumeMountsInitContainer:
EOL
# shellcheck disable=SC1083
DEPLOYMENTS="$(find ./ -name '*deployment.yaml')"
mapfile -t DEPLOYMENTS <<< "$DEPLOYMENTS"
for variable in "${DEPLOYMENTS[@]}"; do
if grep -q volumeMounts "$variable"; then
if ! echo "$variable" | grep -q database; then
sed -i "/^ spec:/r /tmp/initcontainers" "$variable"
else
if echo "$variable" | grep -q database; then
sed -i "/^ spec:/r /tmp/initcontainers.database" "$variable"
elif echo "$variable" | grep -q clamav; then
sed -i "/^ spec:/r /tmp/initcontainers.clamav" "$variable"
else
sed -i "/^ spec:/r /tmp/initcontainers" "$variable"
fi
volumeNames="$(grep -A1 mountPath "$variable" | grep -v mountPath | sed 's|.*name: ||' | sed '/^--$/d')"
mapfile -t volumeNames <<< "$volumeNames"
@@ -101,6 +120,8 @@ for variable in "${DEPLOYMENTS[@]}"; do
# Workaround for the database volume
if [ "$volumeName" = nextcloud-aio-database ]; then
sed -i "/mountPath: \/var\/lib\/postgresql\/data/a\ \ \ \ \ \ \ \ \ \ \ \ \ \ subPath: data" "$variable"
elif [ "$volumeName" = nextcloud-aio-clamav ]; then
sed -i "/mountPath: \/var\/lib\/clamav/a\ \ \ \ \ \ \ \ \ \ \ \ \ \ subPath: data" "$variable"
fi
fi
@@ -192,8 +213,6 @@ done
# Additional config
cat << EOL > /tmp/additional.config
- name: SMTP_HOST
value: "{{ .Values.SMTP_HOST }}"
- name: SMTP_HOST
value: "{{ .Values.SMTP_HOST }}"
- name: SMTP_SECURE
@@ -214,6 +233,8 @@ cat << EOL > /tmp/additional.config
value: "{{ .Values.SUBSCRIPTION_KEY }}"
- name: APPS_ALLOWLIST
value: "{{ .Values.APPS_ALLOWLIST }}"
- name: ADDITIONAL_TRUSTED_PROXY
value: "{{ .Values.ADDITIONAL_TRUSTED_PROXY }}"
EOL
# shellcheck disable=SC1083
find ./ -name '*nextcloud-deployment.yaml' -exec sed -i "/^.*\- env:/r /tmp/additional.config" \{} \;
@@ -245,8 +266,6 @@ sed -i '/_ENABLED.*/s/ no / "no" /' /tmp/sample.conf
sed -i 's|^NEXTCLOUD_TRUSTED_CACERTS_DIR: .*|NEXTCLOUD_TRUSTED_CACERTS_DIR: # Setting this to any value allows to automatically import root certificates into the Nextcloud container|' /tmp/sample.conf
sed -i 's|10737418240|"10737418240"|' /tmp/sample.conf
# shellcheck disable=SC2129
echo "NAMESPACE: default # By changing this, you can adjust the namespace of the installation which allows to install multiple instances on one kubernetes cluster" >> /tmp/sample.conf
# shellcheck disable=SC2129
echo "" >> /tmp/sample.conf
# shellcheck disable=SC2129
echo 'STORAGE_CLASS: # By setting this, you can adjust the storage class for your volumes' >> /tmp/sample.conf
@@ -259,8 +278,10 @@ sed -i "s|NEXTCLOUD_DATA_STORAGE_SIZE: 1Gi|NEXTCLOUD_DATA_STORAGE_SIZE: 5Gi|" /t
# Additional config
cat << ADDITIONAL_CONFIG >> /tmp/sample.conf
NAMESPACE: default # By changing this, you can adjust the namespace of the installation which allows to install multiple instances on one kubernetes cluster
SUBSCRIPTION_KEY: # This allows to set the Nextcloud Enterprise key via ENV
APPS_ALLOWLIST: # This allows to configure allowed apps that will be shown in Nextcloud's Appstore. You need to enter the app-IDs of the apps here and separate them with spaces. E.g. 'files richdocuments'
ADDITIONAL_TRUSTED_PROXY: # Allows to add one additional ip-address to Nextcloud's trusted proxies and to the Office WOPI-allowlist automatically. Set it e.g. like this: 'your.public.ip-address'. You can also use an ip-range here.
SMTP_HOST: # (empty by default): The hostname of the SMTP server.
SMTP_SECURE: # (empty by default): Set to 'ssl' to use SSL, or 'tls' to use STARTTLS.
SMTP_PORT: # (default: '465' for SSL and '25' for non-secure connections): Optional port for the SMTP connection. Use '587' for an alternative port for STARTTLS.

View File

@@ -33,7 +33,6 @@ NEXTCLOUD_UPLOAD_LIMIT: 10G # This allows to change the upload limit of
REMOVE_DISABLED_APPS: yes # Setting this to no keep Nextcloud apps that are disabled via their switch and not uninstall them if they should be installed in Nextcloud.
TALK_PORT: 3478 # This allows to adjust the port that the talk container is using.
UPDATE_NEXTCLOUD_APPS: no # When setting to yes (with quotes), it will automatically update all installed Nextcloud apps upon container startup on saturdays.
NAMESPACE: default # By changing this, you can adjust the namespace of the installation which allows to install multiple instances on one kubernetes cluster
STORAGE_CLASS: # By setting this, you can adjust the storage class for your volumes
APACHE_STORAGE_SIZE: 1Gi # You can change the size of the apache volume that default to 1Gi with this value
@@ -47,6 +46,7 @@ NEXTCLOUD_TRUSTED_CACERTS_STORAGE_SIZE: 1Gi # You can change the size of t
ONLYOFFICE_STORAGE_SIZE: 1Gi # You can change the size of the onlyoffice volume that default to 1Gi with this value
REDIS_STORAGE_SIZE: 1Gi # You can change the size of the redis volume that default to 1Gi with this value
NAMESPACE: default # By changing this, you can adjust the namespace of the installation which allows to install multiple instances on one kubernetes cluster
SUBSCRIPTION_KEY: # This allows to set the Nextcloud Enterprise key via ENV
APPS_ALLOWLIST: # This allows to configure allowed apps that will be shown in Nextcloud's Appstore. You need to enter the app-IDs of the apps here and separate them with spaces. E.g. 'files richdocuments'
SMTP_HOST: # (empty by default): The hostname of the SMTP server.

100
php/composer.lock generated
View File

@@ -1558,6 +1558,89 @@
],
"time": "2023-07-28T09:04:16+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
"reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-php81",
"version": "v1.28.0",
@@ -1639,26 +1722,27 @@
},
{
"name": "twig/twig",
"version": "v3.7.1",
"version": "v3.8.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554"
"reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/9d15f0ac07f44dc4217883ec6ae02fd555c6f71d",
"reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3"
"symfony/polyfill-mbstring": "^1.3",
"symfony/polyfill-php80": "^1.22"
},
"require-dev": {
"psr/container": "^1.0|^2.0",
"symfony/phpunit-bridge": "^5.4.9|^6.3"
"symfony/phpunit-bridge": "^5.4.9|^6.3|^7.0"
},
"type": "library",
"autoload": {
@@ -1694,7 +1778,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.7.1"
"source": "https://github.com/twigphp/Twig/tree/v3.8.0"
},
"funding": [
{
@@ -1706,7 +1790,7 @@
"type": "tidelift"
}
],
"time": "2023-08-28T11:09:02+00:00"
"time": "2023-11-21T18:54:41+00:00"
}
],
"packages-dev": [],

View File

@@ -323,6 +323,9 @@
],
"networks": [
"nextcloud-aio"
],
"cap_add": [
"MKNOD"
]
},
{

View File

@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.15.0@5c774aca4746caf3d239d9c8cadb9f882ca29352"/>
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591"/>

View File

@@ -26,11 +26,11 @@ class DockerController
$this->configurationManager = $configurationManager;
}
private function PerformRecursiveContainerStart(string $id, bool $pullContainer = true) : void {
private function PerformRecursiveContainerStart(string $id, bool $pullImage = true) : void {
$container = $this->containerDefinitionFetcher->GetContainerById($id);
foreach($container->GetDependsOn() as $dependency) {
$this->PerformRecursiveContainerStart($dependency, $pullContainer);
$this->PerformRecursiveContainerStart($dependency, $pullImage);
}
// Don't start if container is already running
@@ -43,15 +43,15 @@ class DockerController
// Skip database image pull if the last shutdown was not clean
if ($id === 'nextcloud-aio-database') {
if ($this->dockerActionManager->GetDatabasecontainerExitCode() > 0) {
$pullContainer = false;
$pullImage = 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);
if ($pullImage) {
$this->dockerActionManager->PullImage($container);
}
$this->dockerActionManager->CreateContainer($container);
$this->dockerActionManager->StartContainer($container);
@@ -188,7 +188,7 @@ class DockerController
return $response->withStatus(201)->withHeader('Location', '/');
}
public function startTopContainer(bool $pullContainer) : void {
public function startTopContainer(bool $pullImage) : void {
$config = $this->configurationManager->GetConfig();
// set AIO_TOKEN
$config['AIO_TOKEN'] = bin2hex(random_bytes(24));
@@ -199,7 +199,7 @@ class DockerController
$id = self::TOP_CONTAINER;
$this->PerformRecursiveContainerStart($id, $pullContainer);
$this->PerformRecursiveContainerStart($id, $pullImage);
}
public function StartWatchtowerContainer(Request $request, Response $response, array $args) : Response {

View File

@@ -577,11 +577,17 @@ class DockerActionManager
}
public function PullContainer(Container $container) : void
public function PullImage(Container $container) : void
{
$url = $this->BuildApiUrl(sprintf('images/create?fromImage=%s', urlencode($this->BuildImageName($container))));
// do not catch any exception so that it always throws and logs the error
$this->guzzleClient->post($url);
$imageName = urlencode($this->BuildImageName($container));
$url = $this->BuildApiUrl(sprintf('images/create?fromImage=%s', $imageName));
try {
$this->guzzleClient->post($url);
$imageUrl = $this->BuildApiUrl(sprintf('images/%s/json', $imageName));
$this->guzzleClient->get($imageUrl)->getBody()->getContents();
} catch (\Throwable $e) {
throw new \Exception("Could not pull image " . $imageName . ". Please run 'sudo docker exec -it nextcloud-aio-mastercontainer docker pull " . $imageName . "' in order to find out why it failed.");
}
}
private function isContainerUpdateAvailable(string $id) : string