NextCloud: Install: Heroku
From Gratiel's Wiki
Contents
Preface
- Ephemeral Drive
- Locked Code
- S3
- Databases
- PostgreSQL
Prerequisites
You are going to need the following Services and Software before getting started with your NextCloud installation on Heroku. Be sure you have accounts setup for the following Services listed below. Also, be sure you have installed the following Software listed below.
Services
Software
sudo snap install heroku --classic
Setup Heroku
Login to Heroku CLI (Ubuntu)
heroku login
Create App
- This needs to be created after git. IT will automatically create the remote links needed in Git
heroku create
Heroku will return a sample app and location. Use this for the rest of the install.
https://infinite-lowlands-38883.herokuapp.com/ | https://git.heroku.com/infinite-lowlands-38883.git
Heroku Add-ons
- Heroku Postgres
Install NextCloud - Phase 1
Download & Extract NextCloud
Download the version of nextcloud
wget https://download.nextcloud.com/server/releases/nextcloud-15.0.8.zip
Unzip nextcloud-x.x.x.zip to it's own folder
unzip nextcloud-15.0.8.zip
Create a new folder `nextcloud-x.x.x`
mkdir nextcloud-15.0.8
Move folder `nextcloud` into `nextcloud-x.x.x` and label it `server`
mv nextcloud nextcloud-15.0.8/server
Initialize Git
cd nextcloud-15.0.8 git init git config user.name "Eric Wanchic" git config user.email "ewanchic@elifestream.com"
cat > .gitignore
Copy & Paste the following to the file:
/vendor/ .env
Ctrl+D
git add . git commit -m "Initial NextCloud 15.0.8"
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": "*"
},
"require-dev": {
"php": "7.2.19",
"ext-mbstring": "*",
"ext-gd": "*",
"ext-intl" : "*",
"ext-imagick": "*",
"ext-memcached": "*",
"ext-pcntl": "*"
}
}
Ctrl+D to exit
composer update
Commit code to repo
git add . git commit -m "Adding composer files."
Setup Procfile
cat > Procfile
Copy & Paste the following to the file:
web: vendor/bin/heroku-php-apache2 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."