fix: Properly auto configure rustfs
Signed-off-by: Julius Knorr <jus@bitgrid.net>
This commit is contained in:
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
ADD data/installing.html /root/installing.html
|
||||
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/
|
||||
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/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
ADD data/installing.html /root/installing.html
|
||||
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/
|
||||
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/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
ADD data/installing.html /root/installing.html
|
||||
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/
|
||||
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/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
ADD data/installing.html /root/installing.html
|
||||
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/
|
||||
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/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
ADD data/installing.html /root/installing.html
|
||||
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/
|
||||
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/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
ADD data/installing.html /root/installing.html
|
||||
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/
|
||||
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/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
ADD data/installing.html /root/installing.html
|
||||
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/
|
||||
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/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
@@ -109,3 +109,49 @@ if ($primary === 'minio-multibucket') {
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
if ($primary === 'rustfs') {
|
||||
$CONFIG += [
|
||||
'objectstore' =>
|
||||
array (
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' =>
|
||||
array (
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'rustfs.local',
|
||||
'port' => '80',
|
||||
'proxy' => 'rustfs:9000',
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
'use_presigned_url' => true,
|
||||
'autocreate' => true,
|
||||
'verify_bucket_exists' => true,
|
||||
),
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
if ($primary === 'rustfs-multibucket') {
|
||||
$CONFIG += [
|
||||
'objectstore_multibucket' => array(
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array(
|
||||
// optional, defaults to 64
|
||||
'num_buckets' => 64,
|
||||
// n integer in the range from 0 to (num_buckets-1) will be appended
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'rustfs.local',
|
||||
'port' => '80',
|
||||
'proxy' => 'rustfs:9000',
|
||||
'use_presigned_url' => true,
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
),
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
<?php
|
||||
// FIXME: Move everything except the last part to the containers
|
||||
// set the hostname to the VIRTUAL_HOST set for the docker container, otherwise fallback to the docker hostname
|
||||
$hostname = gethostname();
|
||||
$primary = isset($_ENV['PRIMARY']) ? $_ENV['PRIMARY'] : '';
|
||||
$virtualHost = isset($_ENV['VIRTUAL_HOST']) ? $_ENV['VIRTUAL_HOST'] : '';
|
||||
$virtualHost = explode(".", $virtualHost);
|
||||
if (count($virtualHost) > 0) {
|
||||
$hostname = array_shift($virtualHost);
|
||||
}
|
||||
|
||||
$CONFIG = [];
|
||||
if ($primary === 'minio') {
|
||||
$CONFIG += [
|
||||
'objectstore' =>
|
||||
array (
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' =>
|
||||
array (
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'minio.local',
|
||||
'port' => '80',
|
||||
'proxy' => 'minio:9000',
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
'use_presigned_url' => true,
|
||||
'autocreate' => true,
|
||||
'verify_bucket_exists' => true,
|
||||
),
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
if ($primary === 'minio-multibucket') {
|
||||
$CONFIG += [
|
||||
'objectstore_multibucket' => array(
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array(
|
||||
// optional, defaults to 64
|
||||
'num_buckets' => 64,
|
||||
// n integer in the range from 0 to (num_buckets-1) will be appended
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'minio.local',
|
||||
'port' => '80',
|
||||
'proxy' => 'minio:9000',
|
||||
'use_presigned_url' => true,
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
),
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
if ($primary === 'rustfs') {
|
||||
$CONFIG += [
|
||||
'objectstore' =>
|
||||
array (
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' =>
|
||||
array (
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'rustfs.local',
|
||||
'port' => '80',
|
||||
'proxy' => 'rustfs:9000',
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
'use_presigned_url' => true,
|
||||
'autocreate' => true,
|
||||
'verify_bucket_exists' => true,
|
||||
),
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
if ($primary === 'rustfs-multibucket') {
|
||||
$CONFIG += [
|
||||
'objectstore_multibucket' => array(
|
||||
'class' => 'OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array(
|
||||
// optional, defaults to 64
|
||||
'num_buckets' => 64,
|
||||
// n integer in the range from 0 to (num_buckets-1) will be appended
|
||||
'bucket' => 'nc-' . $hostname,
|
||||
'key' => 'nextcloud',
|
||||
'secret' => 'nextcloud',
|
||||
'hostname' => 'rustfs.local',
|
||||
'port' => '80',
|
||||
'proxy' => 'rustfs:9000',
|
||||
'use_presigned_url' => true,
|
||||
'use_ssl' => false,
|
||||
'use_path_style' => true,
|
||||
),
|
||||
),
|
||||
];
|
||||
}
|
||||
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
ADD data/installing.html /root/installing.html
|
||||
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/
|
||||
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/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
ADD data/installing.html /root/installing.html
|
||||
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/
|
||||
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/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
ADD data/installing.html /root/installing.html
|
||||
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/
|
||||
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/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
@@ -104,5 +104,5 @@ ENTRYPOINT ["/usr/local/bin/bootstrap.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
ADD data/installing.html /root/installing.html
|
||||
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/
|
||||
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/
|
||||
ADD bin/bootstrap.sh bin/occ /usr/local/bin/
|
||||
|
||||
Reference in New Issue
Block a user