diff --git a/.config/primary-object-storage.config.php b/.config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/.config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/16.0/apache/config/primary-object-storage.config.php b/16.0/apache/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/16.0/apache/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/16.0/fpm-alpine/config/primary-object-storage.config.php b/16.0/fpm-alpine/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/16.0/fpm-alpine/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/16.0/fpm/config/primary-object-storage.config.php b/16.0/fpm/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/16.0/fpm/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/17.0/apache/config/primary-object-storage.config.php b/17.0/apache/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/17.0/apache/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/17.0/fpm-alpine/config/primary-object-storage.config.php b/17.0/fpm-alpine/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/17.0/fpm-alpine/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/17.0/fpm/config/primary-object-storage.config.php b/17.0/fpm/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/17.0/fpm/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/18.0/apache/config/primary-object-storage.config.php b/18.0/apache/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/18.0/apache/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/18.0/fpm-alpine/config/primary-object-storage.config.php b/18.0/fpm-alpine/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/18.0/fpm-alpine/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/18.0/fpm/config/primary-object-storage.config.php b/18.0/fpm/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/18.0/fpm/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/19.0-rc/apache/config/primary-object-storage.config.php b/19.0-rc/apache/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/19.0-rc/apache/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/19.0-rc/fpm-alpine/config/primary-object-storage.config.php b/19.0-rc/fpm-alpine/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/19.0-rc/fpm-alpine/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +} diff --git a/19.0-rc/fpm/config/primary-object-storage.config.php b/19.0-rc/fpm/config/primary-object-storage.config.php new file mode 100644 index 00000000..d00a2d67 --- /dev/null +++ b/19.0-rc/fpm/config/primary-object-storage.config.php @@ -0,0 +1,39 @@ + array ( + 'class' => '\\OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => getenv('S3_BUCKETNAME'), + 'key' => getenv('S3_ACCESS_KEY'), + 'secret' => getenv('S3_SECRET_KEY'), + ) + ) + ); + + // Set optional configurations + if (getenv('S3_AUTOCREATE') !== false) { + $CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE'); + } + + if (getenv('S3_HOST') !== false) { + $CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST'); + } + + if (getenv('S3_PORT') !== false) { + $CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT'); + } + + if (getenv('S3_REGION') !== false) { + $CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION'); + } + + if (getenv('S3_USE_SSL') !== false) { + $CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL'); + } + + if (getenv('S3_USE_PATH_STYLE') !== false) { + $CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE'); + } +}