NextCloud: Heroku: Install: Prepping NextCloud for Heroku
From Gratiel's Wiki
Initialize Git
cd nextcloud-15.0.7 git init git config user.name "Eric Wanchic" git config user.email "eric@gratiel.com"
cat > .gitignore
Copy & Paste the following to the file:
/vendor/ .env
Ctrl+D
git add . git commit -m "Initial NextCloud 15.0.7"
Setup Composer
cat > composer.json
Copy & Paste the following to the file:
{
"require" : {
"php": "7.2.19",
"ext-mbstring": "*",
"ext-gd": "*",
"ext-intl" : "*",
"ext-imagick": "*",
"ext-memcached": "*",
"ext-pcntl": "*",
"ext-apcu": "*"
},
"require-dev": {
"php": "7.2.19",
"ext-mbstring": "*",
"ext-gd": "*",
"ext-intl" : "*",
"ext-imagick": "*",
"ext-memcached": "*",
"ext-pcntl": "*",
"ext-apcu": "*"
}
}
Ctrl+D to exit
composer update
Commit code to repo
git add . git commit -m "Adding composer files."
Setup PHP FPM file
cat > fpm_custom.conf
Copy & Paste the following to the file:
php_value[upload_max_filesize] = 300M php_value[post_max_size] = 200M php_value[memory_limit] = 128M php_value[mbstring.func_overload] = 0 php_value[default_charset] = 'UTF-8' php_value[output_buffering] = 0 php_value[apc.enable_cli] = 1
Ctrl+D to exit
Commit code to repo
git add . git commit -m "Adding custom php fpm."
Setup Procfile
cat > Procfile
Copy & Paste the following to the file:
web: vendor/bin/heroku-php-apache2 -F fpm_custom.conf server/
Ctrl+D to exit
You might be tempted to use nginx instead of apache. In this instance, stay with apache.
Commit code to repo
git add . git commit -m "Adding Procfile."