Difference between revisions of "NextCloud: Install: Heroku"
From Gratiel's Wiki
(→Install NextCloud - Phase 2: - Adding PostgreSQL addon information for Phase #1) |
(→Install NextCloud - Phase 2: pushing to Master) |
||
| Line 131: | Line 131: | ||
== Install NextCloud - Phase 2 == | == Install NextCloud - Phase 2 == | ||
| − | + | Push code to Heroku | |
| + | git push heroku master | ||
== Install NextCloud - Phase 3 == | == Install NextCloud - Phase 3 == | ||
Revision as of 21:44, 14 June 2019
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.
Creating app... done, ⬢ infinite-lowlands-38883 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."
Install PostgreSQL Add on
heroku addons:create heroku-postgresql:hobby-dev --app infinite-lowlands-38883
DB is created. You'll have to log in to get further details.
Creating heroku-postgresql:hobby-dev on ⬢ infinite-lowlands-38883... free Database has been created and is available ! This database is empty. If upgrading, you can transfer ! data from another database with pg:copy Created postgresql-crystalline-20674 as DATABASE_URL Use heroku addons:docs heroku-postgresql to view documentation
Install NextCloud - Phase 2
Push code to Heroku
git push heroku master