0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-07-27 09:08:04 +02:00

Compare commits

...

4 commits

Author SHA1 Message Date
Josh
38a5ee2d0d
Merge 9f1ec22140 into 29d959acfd 2024-10-25 11:21:25 +02:00
GitHub Workflow
29d959acfd Runs update.sh 2024-10-24 19:52:51 +00:00
Valentin Brandl
d3341b61c1
Fix initialization of autocreate and use_ssl (#2309)
According to the documentation, both `OBJECTSTORE_S3_SSL` and
`OBJECTSTORE_S3_AUTOCREATE` should default to `true`.
Currently, when these environment variables are not set, they default to
`false`. (See https://github.com/nextcloud/docker/issues/2308).

This fix works, because `strtolower(false)` returns the empty string. So
when `OBJECTSTORE_S3_SSL` is not set and `getenv('OBJECTSTORE_S3_SSL')`
returns `false`, the check `strtolower($use_ssl) !== 'false'` will
evaluate to `true`.

With this fix, both values will be `true` if they are

* not set
* the empty string
* any string that is not equal to `false` when converted to lowercase

This should now match the documented behavior.

Signed-off-by: Valentin Brandl <mail@vbrandl.net>
2024-10-24 19:52:36 +00:00
Josh
9f1ec22140 chore(examples): add postgres 15 image tag
Signed-off-by: Josh <josh.t.richards@gmail.com>
2024-10-10 10:02:24 -04:00
15 changed files with 25 additions and 25 deletions

View file

@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'autocreate' => strtolower($autocreate) !== 'false',
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, 'use_ssl' => strtolower($use_ssl) !== 'false',
// required for some non Amazon S3 implementations // required for some non Amazon S3 implementations
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions // required for older protocol versions

View file

@ -1,6 +1,6 @@
services: services:
db: db:
image: postgres:alpine image: postgres:15
restart: always restart: always
volumes: volumes:
- db:/var/lib/postgresql/data:Z - db:/var/lib/postgresql/data:Z

View file

@ -1,6 +1,6 @@
services: services:
db: db:
image: postgres:alpine image: postgres:15
restart: always restart: always
volumes: volumes:
- db:/var/lib/postgresql/data:Z - db:/var/lib/postgresql/data:Z

View file

@ -1,6 +1,6 @@
services: services:
db: db:
image: postgres:alpine image: postgres:15
restart: always restart: always
volumes: volumes:
- db:/var/lib/postgresql/data:Z - db:/var/lib/postgresql/data:Z

View file

@ -2,7 +2,7 @@ version: '3'
services: services:
db: db:
image: postgres:alpine image: postgres:15
restart: always restart: always
volumes: volumes:
- db:/var/lib/postgresql/data:Z - db:/var/lib/postgresql/data:Z

View file

@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'autocreate' => strtolower($autocreate) !== 'false',
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, 'use_ssl' => strtolower($use_ssl) !== 'false',
// required for some non Amazon S3 implementations // required for some non Amazon S3 implementations
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions // required for older protocol versions

View file

@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'autocreate' => strtolower($autocreate) !== 'false',
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, 'use_ssl' => strtolower($use_ssl) !== 'false',
// required for some non Amazon S3 implementations // required for some non Amazon S3 implementations
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions // required for older protocol versions

View file

@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'autocreate' => strtolower($autocreate) !== 'false',
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, 'use_ssl' => strtolower($use_ssl) !== 'false',
// required for some non Amazon S3 implementations // required for some non Amazon S3 implementations
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions // required for older protocol versions

View file

@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'autocreate' => strtolower($autocreate) !== 'false',
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, 'use_ssl' => strtolower($use_ssl) !== 'false',
// required for some non Amazon S3 implementations // required for some non Amazon S3 implementations
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions // required for older protocol versions

View file

@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'autocreate' => strtolower($autocreate) !== 'false',
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, 'use_ssl' => strtolower($use_ssl) !== 'false',
// required for some non Amazon S3 implementations // required for some non Amazon S3 implementations
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions // required for older protocol versions

View file

@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'autocreate' => strtolower($autocreate) !== 'false',
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, 'use_ssl' => strtolower($use_ssl) !== 'false',
// required for some non Amazon S3 implementations // required for some non Amazon S3 implementations
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions // required for older protocol versions

View file

@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'autocreate' => strtolower($autocreate) !== 'false',
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, 'use_ssl' => strtolower($use_ssl) !== 'false',
// required for some non Amazon S3 implementations // required for some non Amazon S3 implementations
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions // required for older protocol versions

View file

@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'autocreate' => strtolower($autocreate) !== 'false',
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, 'use_ssl' => strtolower($use_ssl) !== 'false',
// required for some non Amazon S3 implementations // required for some non Amazon S3 implementations
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions // required for older protocol versions

View file

@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'autocreate' => strtolower($autocreate) !== 'false',
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, 'use_ssl' => strtolower($use_ssl) !== 'false',
// required for some non Amazon S3 implementations // required for some non Amazon S3 implementations
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions // required for older protocol versions

View file

@ -414,7 +414,7 @@ As an alternative to passing sensitive information via environment variables, `_
```yaml ```yaml
services: services:
db: db:
image: postgres image: postgres:15
restart: always restart: always
volumes: volumes:
- db:/var/lib/postgresql/data - db:/var/lib/postgresql/data