Skip to content

Commit 563864a

Browse files
committed
fix: Properly auto configure rustfs
Signed-off-by: Julius Knorr <jus@bitgrid.net>
1 parent a0e60da commit 563864a

13 files changed

Lines changed: 57 additions & 112 deletions

docker/Dockerfile.php.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
104104
CMD ["apache2-foreground"]
105105

106106
ADD data/installing.html /root/installing.html
107-
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
107+
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/redis.config.php configs/apcu.config.php /root/
108108
ADD bin/bootstrap.sh bin/occ /usr/local/bin/

docker/Dockerfile.php71

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
104104
CMD ["apache2-foreground"]
105105

106106
ADD data/installing.html /root/installing.html
107-
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
107+
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/redis.config.php configs/apcu.config.php /root/
108108
ADD bin/bootstrap.sh bin/occ /usr/local/bin/

docker/Dockerfile.php72

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
104104
CMD ["apache2-foreground"]
105105

106106
ADD data/installing.html /root/installing.html
107-
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
107+
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/redis.config.php configs/apcu.config.php /root/
108108
ADD bin/bootstrap.sh bin/occ /usr/local/bin/

docker/Dockerfile.php73

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
104104
CMD ["apache2-foreground"]
105105

106106
ADD data/installing.html /root/installing.html
107-
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
107+
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/redis.config.php configs/apcu.config.php /root/
108108
ADD bin/bootstrap.sh bin/occ /usr/local/bin/

docker/Dockerfile.php74

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
104104
CMD ["apache2-foreground"]
105105

106106
ADD data/installing.html /root/installing.html
107-
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
107+
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/redis.config.php configs/apcu.config.php /root/
108108
ADD bin/bootstrap.sh bin/occ /usr/local/bin/

docker/Dockerfile.php80

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
104104
CMD ["apache2-foreground"]
105105

106106
ADD data/installing.html /root/installing.html
107-
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
107+
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/redis.config.php configs/apcu.config.php /root/
108108
ADD bin/bootstrap.sh bin/occ /usr/local/bin/

docker/Dockerfile.php81

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
104104
CMD ["apache2-foreground"]
105105

106106
ADD data/installing.html /root/installing.html
107-
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
107+
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/redis.config.php configs/apcu.config.php /root/
108108
ADD bin/bootstrap.sh bin/occ /usr/local/bin/

docker/configs/default.config.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,49 @@
109109
),
110110
];
111111
}
112+
113+
114+
if ($primary === 'rustfs') {
115+
$CONFIG += [
116+
'objectstore' =>
117+
array (
118+
'class' => 'OC\\Files\\ObjectStore\\S3',
119+
'arguments' =>
120+
array (
121+
'bucket' => 'nc-' . $hostname,
122+
'key' => 'nextcloud',
123+
'secret' => 'nextcloud',
124+
'hostname' => 'rustfs.local',
125+
'port' => '80',
126+
'proxy' => 'rustfs:9000',
127+
'use_ssl' => false,
128+
'use_path_style' => true,
129+
'use_presigned_url' => true,
130+
'autocreate' => true,
131+
'verify_bucket_exists' => true,
132+
),
133+
)
134+
];
135+
}
136+
137+
if ($primary === 'rustfs-multibucket') {
138+
$CONFIG += [
139+
'objectstore_multibucket' => array(
140+
'class' => 'OC\\Files\\ObjectStore\\S3',
141+
'arguments' => array(
142+
// optional, defaults to 64
143+
'num_buckets' => 64,
144+
// n integer in the range from 0 to (num_buckets-1) will be appended
145+
'bucket' => 'nc-' . $hostname,
146+
'key' => 'nextcloud',
147+
'secret' => 'nextcloud',
148+
'hostname' => 'rustfs.local',
149+
'port' => '80',
150+
'proxy' => 'rustfs:9000',
151+
'use_presigned_url' => true,
152+
'use_ssl' => false,
153+
'use_path_style' => true,
154+
),
155+
),
156+
];
157+
}

docker/configs/storage.config.php

Lines changed: 0 additions & 101 deletions
This file was deleted.

docker/php82/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
104104
CMD ["apache2-foreground"]
105105

106106
ADD data/installing.html /root/installing.html
107-
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/storage.config.php configs/redis.config.php configs/apcu.config.php /root/
107+
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/default.config.php configs/redis.config.php configs/apcu.config.php /root/
108108
ADD bin/bootstrap.sh bin/occ /usr/local/bin/

0 commit comments

Comments
 (0)