NextCloud: Heroku: Install: Update Config File for S3 File Storage
From Gratiel's Wiki
Now we need to modify the config.php in your desktop version to use the S3 bucket for file storage instead of the local ephemeral drive. Also, we need to make sure that the S3 keys are obtained from Heroku's environment variables. Change your config file to read: Note: Be sure to replace the variables that work for your instance of NextCloud!
<?php
$CONFIG = array (
'instanceid' => 'ocklnegqyxwr',
'objectstore' =>
array (
'class' => '\\OC\\Files\\ObjectStore\\S3',
'arguments' =>
array (
'bucket' => getenv('S3_BUCKET'),
'autocreate' => true,
'key' => getenv('S3_KEY'),
'secret' => getenv('S3_SECRET'),
'use_ssl' => true,
'region' => getenv('S3_REGION'),
'use_path_style' => false,
),
),
);
Go ahead and update the config.php on your local git repo to match this. Save and commit.
git add . git commit -m "Updated config.php. Includes S3 credentials, important values are being replaced by Environment Variables."