From ac02e17a20d161e8f3dc19bf3beea521c29efba9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 10:10:31 +0000 Subject: [PATCH] reuse: add SPDX headers to container config files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com> --- Containers/apache/Caddyfile | 3 + Containers/apache/nextcloud.conf | 3 + Containers/apache/supervisord.conf | 47 ++++----- Containers/borgbackup/backupscript.sh | 3 + Containers/borgbackup/borg_excludes | 3 + Containers/clamav/supervisord.conf | 3 + Containers/docker-socket-proxy/haproxy.cfg | 3 + Containers/domaincheck/lighttpd.conf | 3 + Containers/mastercontainer/README.md | 5 + Containers/mastercontainer/acme.Caddyfile | 3 + .../backup-time-file-watcher.sh | 3 + Containers/mastercontainer/cron.sh | 3 + Containers/mastercontainer/daily-backup.sh | 3 + Containers/mastercontainer/headers.Caddyfile | 3 + Containers/mastercontainer/internal.Caddyfile | 3 + .../mastercontainer/session-deduplicator.sh | 3 + Containers/mastercontainer/supervisord.conf | 3 + Containers/nextcloud/README.md | 5 + Containers/nextcloud/config/aio.config.php | 3 + Containers/nextcloud/config/apcu.config.php | 3 + Containers/nextcloud/config/apps.config.php | 3 + .../config/certificates-bundle.config.php | 3 + .../nextcloud/config/postgres.config.php | 3 + Containers/nextcloud/config/proxy.config.php | 3 + Containers/nextcloud/config/redis.config.php | 3 + .../nextcloud/config/reverse-proxy.config.php | 3 + Containers/nextcloud/config/s3.config.php | 97 ++++++++++--------- Containers/nextcloud/config/server.config.php | 3 + Containers/nextcloud/config/smtp.config.php | 3 + Containers/nextcloud/config/swift.config.php | 65 +++++++------ Containers/nextcloud/cron.sh | 3 + Containers/nextcloud/entrypoint.sh | 3 + Containers/nextcloud/notify-all.sh | 3 + Containers/nextcloud/notify.sh | 3 + Containers/nextcloud/run-exec-commands.sh | 3 + Containers/nextcloud/supervisord.conf | 3 + Containers/postgresql/init-user-db.sh | 3 + Containers/talk/server.conf.in | 3 + Containers/talk/supervisord.conf | 3 + 39 files changed, 221 insertions(+), 100 deletions(-) diff --git a/Containers/apache/Caddyfile b/Containers/apache/Caddyfile index 51a11604..f99a865f 100644 --- a/Containers/apache/Caddyfile +++ b/Containers/apache/Caddyfile @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + { auto_https disable_redirects diff --git a/Containers/apache/nextcloud.conf b/Containers/apache/nextcloud.conf index 58773e44..1ee23b57 100644 --- a/Containers/apache/nextcloud.conf +++ b/Containers/apache/nextcloud.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + Listen 8000 ServerName localhost diff --git a/Containers/apache/supervisord.conf b/Containers/apache/supervisord.conf index 25f80079..ae823bba 100644 --- a/Containers/apache/supervisord.conf +++ b/Containers/apache/supervisord.conf @@ -1,22 +1,25 @@ -[supervisord] -nodaemon=true -logfile=/var/log/supervisord/supervisord.log -pidfile=/var/run/supervisord/supervisord.pid -childlogdir=/var/log/supervisord/ -logfile_maxbytes=50MB -logfile_backups=10 -loglevel=%(ENV_AIO_LOG_LEVEL)s - -[program:apache] -# Stdout logging is disabled as otherwise the logs are spammed -stdout_logfile=%(ENV_SUPERVISORD_STDOUT)s -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -command=apachectl -DFOREGROUND - -[program:caddy] -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -command=/usr/bin/caddy run --config /tmp/Caddyfile +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + +[supervisord] +nodaemon=true +logfile=/var/log/supervisord/supervisord.log +pidfile=/var/run/supervisord/supervisord.pid +childlogdir=/var/log/supervisord/ +logfile_maxbytes=50MB +logfile_backups=10 +loglevel=%(ENV_AIO_LOG_LEVEL)s + +[program:apache] +# Stdout logging is disabled as otherwise the logs are spammed +stdout_logfile=%(ENV_SUPERVISORD_STDOUT)s +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=apachectl -DFOREGROUND + +[program:caddy] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=/usr/bin/caddy run --config /tmp/Caddyfile diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 20d8596a..6933e1a7 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + if [ "$AIO_LOG_LEVEL" = 'debug' ]; then set -x diff --git a/Containers/borgbackup/borg_excludes b/Containers/borgbackup/borg_excludes index bbe6adaa..da86c793 100644 --- a/Containers/borgbackup/borg_excludes +++ b/Containers/borgbackup/borg_excludes @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2024 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + # These patterns need to be kept in sync with rsync and find excludes in backupscript.sh, # which use a different syntax (patterns appear in 3 places in total) nextcloud_aio_volumes/nextcloud_aio_apache/caddy/ diff --git a/Containers/clamav/supervisord.conf b/Containers/clamav/supervisord.conf index 1d7685b1..d2fe9356 100644 --- a/Containers/clamav/supervisord.conf +++ b/Containers/clamav/supervisord.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + [supervisord] nodaemon=true logfile=/var/log/supervisord/supervisord.log diff --git a/Containers/docker-socket-proxy/haproxy.cfg b/Containers/docker-socket-proxy/haproxy.cfg index 632df434..34d7967c 100644 --- a/Containers/docker-socket-proxy/haproxy.cfg +++ b/Containers/docker-socket-proxy/haproxy.cfg @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2023 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + # Inspiration: https://github.com/Tecnativa/docker-socket-proxy/blob/master/haproxy.cfg global diff --git a/Containers/domaincheck/lighttpd.conf b/Containers/domaincheck/lighttpd.conf index 8b2bb842..9c334de5 100644 --- a/Containers/domaincheck/lighttpd.conf +++ b/Containers/domaincheck/lighttpd.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + server.document-root = "/var/www/domaincheck/" server.port = env.APACHE_PORT diff --git a/Containers/mastercontainer/README.md b/Containers/mastercontainer/README.md index 7206a5f3..67cacea3 100644 --- a/Containers/mastercontainer/README.md +++ b/Containers/mastercontainer/README.md @@ -1,3 +1,8 @@ + + # Nextcloud All-in-One `mastercontainer` This folder contains the OCI/Docker container definition, along with associated resources and diff --git a/Containers/mastercontainer/acme.Caddyfile b/Containers/mastercontainer/acme.Caddyfile index 77d7df9e..646f1555 100644 --- a/Containers/mastercontainer/acme.Caddyfile +++ b/Containers/mastercontainer/acme.Caddyfile @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2026 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + { admin off diff --git a/Containers/mastercontainer/backup-time-file-watcher.sh b/Containers/mastercontainer/backup-time-file-watcher.sh index 6c5fc80d..f396f2b0 100644 --- a/Containers/mastercontainer/backup-time-file-watcher.sh +++ b/Containers/mastercontainer/backup-time-file-watcher.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2022 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + if [ "$AIO_LOG_LEVEL" = 'debug' ]; then set -x diff --git a/Containers/mastercontainer/cron.sh b/Containers/mastercontainer/cron.sh index af0a25bc..e95aa4a7 100644 --- a/Containers/mastercontainer/cron.sh +++ b/Containers/mastercontainer/cron.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + if [ "$AIO_LOG_LEVEL" = 'debug' ]; then set -x diff --git a/Containers/mastercontainer/daily-backup.sh b/Containers/mastercontainer/daily-backup.sh index 99293b60..4b119171 100644 --- a/Containers/mastercontainer/daily-backup.sh +++ b/Containers/mastercontainer/daily-backup.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2022 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + if [ "$AIO_LOG_LEVEL" = 'debug' ]; then set -x diff --git a/Containers/mastercontainer/headers.Caddyfile b/Containers/mastercontainer/headers.Caddyfile index 269ead29..9ead6471 100644 --- a/Containers/mastercontainer/headers.Caddyfile +++ b/Containers/mastercontainer/headers.Caddyfile @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2026 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + header { # CSP limits which features can be used. By default we allow nothing and only allow required options. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy # default-src 'none'; Allow nothing by default diff --git a/Containers/mastercontainer/internal.Caddyfile b/Containers/mastercontainer/internal.Caddyfile index 9890acc0..79c2b157 100644 --- a/Containers/mastercontainer/internal.Caddyfile +++ b/Containers/mastercontainer/internal.Caddyfile @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2026 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + { admin off diff --git a/Containers/mastercontainer/session-deduplicator.sh b/Containers/mastercontainer/session-deduplicator.sh index 73f886ba..8dd1676e 100644 --- a/Containers/mastercontainer/session-deduplicator.sh +++ b/Containers/mastercontainer/session-deduplicator.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2022 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + deduplicate_sessions() { echo "Deleting duplicate sessions" diff --git a/Containers/mastercontainer/supervisord.conf b/Containers/mastercontainer/supervisord.conf index df682fff..a9dce2ca 100644 --- a/Containers/mastercontainer/supervisord.conf +++ b/Containers/mastercontainer/supervisord.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + [supervisord] nodaemon=true logfile=/var/log/supervisord/supervisord.log diff --git a/Containers/nextcloud/README.md b/Containers/nextcloud/README.md index 574afd03..29f35113 100644 --- a/Containers/nextcloud/README.md +++ b/Containers/nextcloud/README.md @@ -1,3 +1,8 @@ + + # Nextcloud All-in-One ``nextcloud`` Container This folder contains the OCI/Docker container definition, along with associated resources and configuration files, for building the `nextcloud` container as part of the [Nextcloud All-in-One](https://github.com/nextcloud/all-in-one) project. This container hosts PHP and the Nextcloud Server application. diff --git a/Containers/nextcloud/config/aio.config.php b/Containers/nextcloud/config/aio.config.php index 7c80b6ba..548f560c 100644 --- a/Containers/nextcloud/config/aio.config.php +++ b/Containers/nextcloud/config/aio.config.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + $CONFIG = array ( 'one-click-instance' => true, 'one-click-instance.user-limit' => 100, diff --git a/Containers/nextcloud/config/apcu.config.php b/Containers/nextcloud/config/apcu.config.php index 69fed876..accbe65b 100644 --- a/Containers/nextcloud/config/apcu.config.php +++ b/Containers/nextcloud/config/apcu.config.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + $CONFIG = array ( 'memcache.local' => '\OC\Memcache\APCu', ); diff --git a/Containers/nextcloud/config/apps.config.php b/Containers/nextcloud/config/apps.config.php index eb2dbe58..fe288293 100644 --- a/Containers/nextcloud/config/apps.config.php +++ b/Containers/nextcloud/config/apps.config.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + $CONFIG = array ( 'apps_paths' => array ( 0 => array ( diff --git a/Containers/nextcloud/config/certificates-bundle.config.php b/Containers/nextcloud/config/certificates-bundle.config.php index cc05b06a..3e4d57d8 100644 --- a/Containers/nextcloud/config/certificates-bundle.config.php +++ b/Containers/nextcloud/config/certificates-bundle.config.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + // Check if NEXTCLOUD_TRUSTED_CERTIFICATES_ are configured if (str_contains(implode(' ', array_keys(getenv())), 'NEXTCLOUD_TRUSTED_CERTIFICATES_')) { $CONFIG['default_certificates_bundle_path'] = '/var/www/html/data/certificates/ca-bundle.crt'; diff --git a/Containers/nextcloud/config/postgres.config.php b/Containers/nextcloud/config/postgres.config.php index 0dc835cc..5c3cda35 100644 --- a/Containers/nextcloud/config/postgres.config.php +++ b/Containers/nextcloud/config/postgres.config.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + if (getenv('NEXTCLOUD_TRUSTED_CERTIFICATES_POSTGRES')) { $CONFIG = array( 'pgsql_ssl' => array( diff --git a/Containers/nextcloud/config/proxy.config.php b/Containers/nextcloud/config/proxy.config.php index c283f86e..9c217eb2 100644 --- a/Containers/nextcloud/config/proxy.config.php +++ b/Containers/nextcloud/config/proxy.config.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + if (getenv('HTTP_PROXY')) { $CONFIG['proxy'] = getenv('HTTP_PROXY'); } diff --git a/Containers/nextcloud/config/redis.config.php b/Containers/nextcloud/config/redis.config.php index 2fe53380..5d78fd11 100644 --- a/Containers/nextcloud/config/redis.config.php +++ b/Containers/nextcloud/config/redis.config.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + if (getenv('REDIS_MODE') !== 'rediscluster') { $CONFIG = array( 'memcache.distributed' => '\OC\Memcache\Redis', diff --git a/Containers/nextcloud/config/reverse-proxy.config.php b/Containers/nextcloud/config/reverse-proxy.config.php index c8650913..51e3deb5 100644 --- a/Containers/nextcloud/config/reverse-proxy.config.php +++ b/Containers/nextcloud/config/reverse-proxy.config.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + $overwriteHost = getenv('OVERWRITEHOST'); if ($overwriteHost) { $CONFIG['overwritehost'] = $overwriteHost; diff --git a/Containers/nextcloud/config/s3.config.php b/Containers/nextcloud/config/s3.config.php index a6472ae1..ba4afe9d 100644 --- a/Containers/nextcloud/config/s3.config.php +++ b/Containers/nextcloud/config/s3.config.php @@ -1,47 +1,50 @@ - array( - 'class' => '\OC\Files\ObjectStore\S3', - 'arguments' => array( - 'multibucket' => $multibucket === 'true', - 'num_buckets' => (int)getenv('OBJECTSTORE_S3_NUM_BUCKETS') ?: 64, - 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), - 'key' => getenv('OBJECTSTORE_S3_KEY') ?: '', - 'secret' => getenv('OBJECTSTORE_S3_SECRET') ?: '', - 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', - 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', - 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', - 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', - 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => strtolower($autocreate) !== 'false', - 'use_ssl' => strtolower($use_ssl) !== 'false', - // required for some non Amazon S3 implementations - 'use_path_style' => strtolower($use_path) === 'true', - // required for older protocol versions - 'legacy_auth' => strtolower($use_legacyauth) === 'true', - 'use_nextcloud_bundle' => 1, - ) - ) - ); - - $sse_c_key = getenv('OBJECTSTORE_S3_SSE_C_KEY'); - if ($sse_c_key) { - $CONFIG['objectstore']['arguments']['sse_c_key'] = $sse_c_key; - } - - $requestChecksumValidation = getenv('OBJECTSTORE_S3_REQUEST_CHECKSUM_VALIDATION'); - if ($requestChecksumValidation) { - $CONFIG['objectstore']['arguments']['request_checksum_calculation'] = $requestChecksumValidation; - } - - $responseChecksumValidation = getenv('OBJECTSTORE_S3_RESPONSE_CHECKSUM_VALIDATION'); - if ($responseChecksumValidation) { - $CONFIG['objectstore']['arguments']['response_checksum_validation'] = $responseChecksumValidation; - } -} + +// SPDX-License-Identifier: AGPL-3.0-only + +if (getenv('OBJECTSTORE_S3_BUCKET')) { + $use_ssl = getenv('OBJECTSTORE_S3_SSL'); + $use_path = getenv('OBJECTSTORE_S3_USEPATH_STYLE'); + $use_legacyauth = getenv('OBJECTSTORE_S3_LEGACYAUTH'); + $autocreate = getenv('OBJECTSTORE_S3_AUTOCREATE'); + $multibucket = getenv('OBJECTSTORE_S3_MULTIBUCKET'); + $CONFIG = array( + 'objectstore' => array( + 'class' => '\OC\Files\ObjectStore\S3', + 'arguments' => array( + 'multibucket' => $multibucket === 'true', + 'num_buckets' => (int)getenv('OBJECTSTORE_S3_NUM_BUCKETS') ?: 64, + 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), + 'key' => getenv('OBJECTSTORE_S3_KEY') ?: '', + 'secret' => getenv('OBJECTSTORE_S3_SECRET') ?: '', + 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', + 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', + 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', + 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', + // required for some non Amazon S3 implementations + 'use_path_style' => strtolower($use_path) === 'true', + // required for older protocol versions + 'legacy_auth' => strtolower($use_legacyauth) === 'true', + 'use_nextcloud_bundle' => 1, + ) + ) + ); + + $sse_c_key = getenv('OBJECTSTORE_S3_SSE_C_KEY'); + if ($sse_c_key) { + $CONFIG['objectstore']['arguments']['sse_c_key'] = $sse_c_key; + } + + $requestChecksumValidation = getenv('OBJECTSTORE_S3_REQUEST_CHECKSUM_VALIDATION'); + if ($requestChecksumValidation) { + $CONFIG['objectstore']['arguments']['request_checksum_calculation'] = $requestChecksumValidation; + } + + $responseChecksumValidation = getenv('OBJECTSTORE_S3_RESPONSE_CHECKSUM_VALIDATION'); + if ($responseChecksumValidation) { + $CONFIG['objectstore']['arguments']['response_checksum_validation'] = $responseChecksumValidation; + } +} diff --git a/Containers/nextcloud/config/server.config.php b/Containers/nextcloud/config/server.config.php index c0c427c6..ac088a7d 100644 --- a/Containers/nextcloud/config/server.config.php +++ b/Containers/nextcloud/config/server.config.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + $CONFIG = array ( 'serverid' => crc32(gethostname()) % 512, ); diff --git a/Containers/nextcloud/config/smtp.config.php b/Containers/nextcloud/config/smtp.config.php index b57f9b68..49fcebd2 100644 --- a/Containers/nextcloud/config/smtp.config.php +++ b/Containers/nextcloud/config/smtp.config.php @@ -1,4 +1,7 @@ +// SPDX-License-Identifier: AGPL-3.0-only + if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) { $CONFIG = array ( 'mail_smtpmode' => 'smtp', diff --git a/Containers/nextcloud/config/swift.config.php b/Containers/nextcloud/config/swift.config.php index d46818ae..f8a0b1a7 100644 --- a/Containers/nextcloud/config/swift.config.php +++ b/Containers/nextcloud/config/swift.config.php @@ -1,31 +1,34 @@ - [ - 'class' => 'OC\\Files\\ObjectStore\\Swift', - 'arguments' => [ - 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', - 'user' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), - 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', - ], - ], - 'scope' => [ - 'project' => [ - 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), - 'domain' => [ - 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', - ], - ], - ], - 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', - 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), - 'url' => getenv('OBJECTSTORE_SWIFT_URL'), - 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), - ] - ] - ); -} + +// SPDX-License-Identifier: AGPL-3.0-only + +if (getenv('OBJECTSTORE_SWIFT_URL')) { + $autocreate = getenv('OBJECTSTORE_SWIFT_AUTOCREATE'); + $CONFIG = array( + 'objectstore' => [ + 'class' => 'OC\\Files\\ObjectStore\\Swift', + 'arguments' => [ + 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false', + 'user' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'), + 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default', + ], + ], + 'scope' => [ + 'project' => [ + 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'), + 'domain' => [ + 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default', + ], + ], + ], + 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift', + 'region' => getenv('OBJECTSTORE_SWIFT_REGION'), + 'url' => getenv('OBJECTSTORE_SWIFT_URL'), + 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'), + ] + ] + ); +} diff --git a/Containers/nextcloud/cron.sh b/Containers/nextcloud/cron.sh index c43822ca..c1620f10 100644 --- a/Containers/nextcloud/cron.sh +++ b/Containers/nextcloud/cron.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + if [ "$AIO_LOG_LEVEL" = 'debug' ]; then set -x diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 07e0ae24..89cc2b7d 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + # version_greater A B returns whether A > B version_greater() { diff --git a/Containers/nextcloud/notify-all.sh b/Containers/nextcloud/notify-all.sh index 137abd2e..fd953fac 100644 --- a/Containers/nextcloud/notify-all.sh +++ b/Containers/nextcloud/notify-all.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + if [ "$AIO_LOG_LEVEL" = 'debug' ]; then set -x diff --git a/Containers/nextcloud/notify.sh b/Containers/nextcloud/notify.sh index 5851c1ba..502e1e92 100644 --- a/Containers/nextcloud/notify.sh +++ b/Containers/nextcloud/notify.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + if [ "$AIO_LOG_LEVEL" = 'debug' ]; then set -x diff --git a/Containers/nextcloud/run-exec-commands.sh b/Containers/nextcloud/run-exec-commands.sh index 5f3a9744..4be10079 100644 --- a/Containers/nextcloud/run-exec-commands.sh +++ b/Containers/nextcloud/run-exec-commands.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2023 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + if [ "$AIO_LOG_LEVEL" = 'debug' ]; then set -x diff --git a/Containers/nextcloud/supervisord.conf b/Containers/nextcloud/supervisord.conf index 5bf90ed0..6bd34058 100644 --- a/Containers/nextcloud/supervisord.conf +++ b/Containers/nextcloud/supervisord.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + # From https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/full/fpm/supervisord.conf [supervisord] nodaemon=true diff --git a/Containers/postgresql/init-user-db.sh b/Containers/postgresql/init-user-db.sh index e3578a39..f527b8f4 100644 --- a/Containers/postgresql/init-user-db.sh +++ b/Containers/postgresql/init-user-db.sh @@ -1,4 +1,7 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2022 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + if [ "$AIO_LOG_LEVEL" = 'debug' ]; then set -x diff --git a/Containers/talk/server.conf.in b/Containers/talk/server.conf.in index 2e0a7cf2..f73158e0 100644 --- a/Containers/talk/server.conf.in +++ b/Containers/talk/server.conf.in @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2023 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + [http] # IP and port to listen on for HTTP requests. # Comment line to disable the listener. diff --git a/Containers/talk/supervisord.conf b/Containers/talk/supervisord.conf index 69889a4c..4da28484 100644 --- a/Containers/talk/supervisord.conf +++ b/Containers/talk/supervisord.conf @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only + [supervisord] nodaemon=true logfile=/var/log/supervisord/supervisord.log