Skip to content

Commit b720626

Browse files
authored
fix(nextcloud): sync defaultConfig from docker-container (#799)
take nextcloud/docker@1f87830 Signed-off-by: WrenIX <[email protected]>
1 parent 4335f27 commit b720626

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

charts/nextcloud/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: nextcloud
3-
version: 8.5.8
3+
version: 8.5.9
44
# renovate: image=docker.io/library/nextcloud
55
appVersion: 32.0.2
66
description: A file sharing server that puts the control and security of your own data back into your hands.
Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<?php
2+
23
$autoconfig_enabled = false;
4+
35
if (getenv('SQLITE_DATABASE')) {
4-
$AUTOCONFIG["dbtype"] = "sqlite";
5-
$AUTOCONFIG["dbname"] = getenv('SQLITE_DATABASE');
6+
$AUTOCONFIG['dbtype'] = 'sqlite';
7+
$AUTOCONFIG['dbname'] = getenv('SQLITE_DATABASE');
68
$autoconfig_enabled = true;
79
} elseif (getenv('MYSQL_DATABASE_FILE') && getenv('MYSQL_USER_FILE') && getenv('MYSQL_PASSWORD_FILE') && getenv('MYSQL_HOST')) {
810
$AUTOCONFIG['dbtype'] = 'mysql';
@@ -12,11 +14,11 @@ if (getenv('SQLITE_DATABASE')) {
1214
$AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST');
1315
$autoconfig_enabled = true;
1416
} elseif (getenv('MYSQL_DATABASE') && getenv('MYSQL_USER') && getenv('MYSQL_PASSWORD') && getenv('MYSQL_HOST')) {
15-
$AUTOCONFIG["dbtype"] = "mysql";
16-
$AUTOCONFIG["dbname"] = getenv('MYSQL_DATABASE');
17-
$AUTOCONFIG["dbuser"] = getenv('MYSQL_USER');
18-
$AUTOCONFIG["dbpass"] = getenv('MYSQL_PASSWORD');
19-
$AUTOCONFIG["dbhost"] = getenv('MYSQL_HOST');
17+
$AUTOCONFIG['dbtype'] = 'mysql';
18+
$AUTOCONFIG['dbname'] = getenv('MYSQL_DATABASE');
19+
$AUTOCONFIG['dbuser'] = getenv('MYSQL_USER');
20+
$AUTOCONFIG['dbpass'] = getenv('MYSQL_PASSWORD');
21+
$AUTOCONFIG['dbhost'] = getenv('MYSQL_HOST');
2022
$autoconfig_enabled = true;
2123
} elseif (getenv('POSTGRES_DB_FILE') && getenv('POSTGRES_USER_FILE') && getenv('POSTGRES_PASSWORD_FILE') && getenv('POSTGRES_HOST')) {
2224
$AUTOCONFIG['dbtype'] = 'pgsql';
@@ -26,13 +28,14 @@ if (getenv('SQLITE_DATABASE')) {
2628
$AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST');
2729
$autoconfig_enabled = true;
2830
} elseif (getenv('POSTGRES_DB') && getenv('POSTGRES_USER') && getenv('POSTGRES_PASSWORD') && getenv('POSTGRES_HOST')) {
29-
$AUTOCONFIG["dbtype"] = "pgsql";
30-
$AUTOCONFIG["dbname"] = getenv('POSTGRES_DB');
31-
$AUTOCONFIG["dbuser"] = getenv('POSTGRES_USER');
32-
$AUTOCONFIG["dbpass"] = getenv('POSTGRES_PASSWORD');
33-
$AUTOCONFIG["dbhost"] = getenv('POSTGRES_HOST');
31+
$AUTOCONFIG['dbtype'] = 'pgsql';
32+
$AUTOCONFIG['dbname'] = getenv('POSTGRES_DB');
33+
$AUTOCONFIG['dbuser'] = getenv('POSTGRES_USER');
34+
$AUTOCONFIG['dbpass'] = getenv('POSTGRES_PASSWORD');
35+
$AUTOCONFIG['dbhost'] = getenv('POSTGRES_HOST');
3436
$autoconfig_enabled = true;
3537
}
38+
3639
if ($autoconfig_enabled) {
37-
$AUTOCONFIG["directory"] = getenv('NEXTCLOUD_DATA_DIR') ?: "/var/www/html/data";
40+
$AUTOCONFIG['directory'] = getenv('NEXTCLOUD_DATA_DIR') ?: '/var/www/html/data';
3841
}

charts/nextcloud/files/defaultConfigs/redis.config.php.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ if (getenv('REDIS_HOST')) {
1414
} elseif (getenv('REDIS_HOST')[0] != '/') {
1515
$CONFIG['redis']['port'] = 6379;
1616
}
17+
18+
if (getenv('REDIS_HOST_USER') !== false) {
19+
$CONFIG['redis']['user'] = (string) getenv('REDIS_HOST_USER');
20+
}
1721
}

0 commit comments

Comments
 (0)