preseed-config.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. $CONFIG = [
  3. 'appstoreenabled' => false,
  4. 'apps_paths' => [
  5. [
  6. 'path' => OC::$SERVERROOT . '/apps',
  7. 'url' => '/apps',
  8. 'writable' => true,
  9. ],
  10. ],
  11. ];
  12. if (is_dir(OC::$SERVERROOT.'/apps2')) {
  13. $CONFIG['apps_paths'][] = [
  14. 'path' => OC::$SERVERROOT . '/apps2',
  15. 'url' => '/apps2',
  16. 'writable' => false,
  17. ];
  18. }
  19. if (getenv('OBJECT_STORE') === 's3') {
  20. $CONFIG['objectstore'] = [
  21. 'class' => 'OC\\Files\\ObjectStore\\S3',
  22. 'arguments' => array(
  23. 'bucket' => 'nextcloud',
  24. 'autocreate' => true,
  25. 'key' => 'dummy',
  26. 'secret' => 'dummy',
  27. 'hostname' => getenv('DRONE') === 'true' ? 'fake-s3' : 'localhost',
  28. 'port' => 4569,
  29. 'use_ssl' => false,
  30. // required for some non amazon s3 implementations
  31. 'use_path_style' => true
  32. )
  33. ];
  34. }
  35. if (getenv('OBJECT_STORE') === 'swift') {
  36. $swiftHost = getenv('DRONE') === 'true' ? 'dockswift' : 'localhost';
  37. if (getenv('SWIFT-AUTH') === 'v2.0') {
  38. $CONFIG['objectstore'] = [
  39. 'class' => 'OC\\Files\\ObjectStore\\Swift',
  40. 'arguments' => array(
  41. 'autocreate' => true,
  42. 'username' => 'swift',
  43. 'tenantName' => 'service',
  44. 'password' => 'swift',
  45. 'serviceName' => 'swift',
  46. 'region' => 'regionOne',
  47. 'url' => "http://$swiftHost:5000/v2.0",
  48. 'bucket' => 'nextcloud'
  49. )
  50. ];
  51. } else {
  52. $CONFIG['objectstore'] = [
  53. 'class' => 'OC\\Files\\ObjectStore\\Swift',
  54. 'arguments' => array(
  55. 'autocreate' => true,
  56. 'user' => [
  57. 'name' => 'swift',
  58. 'password' => 'swift',
  59. 'domain' => [
  60. 'name' => 'default',
  61. ]
  62. ],
  63. 'tenantName' => 'service',
  64. 'serviceName' => 'swift',
  65. 'region' => 'regionOne',
  66. 'url' => "http://$swiftHost:5000/v3",
  67. 'bucket' => 'nextcloud'
  68. )
  69. ];
  70. }
  71. }