Difference between revisions of "NextCloud: Install: Heroku"
(→Setup PHP FPM file) |
(→Install NextCloud - Phase 2) |
||
| Line 151: | Line 151: | ||
== Install NextCloud - Phase 2 == | == Install NextCloud - Phase 2 == | ||
| − | + | === Pushing Code to Heroku === | |
git push heroku master | git push heroku master | ||
Do not setup the app just yet. | Do not setup the app just yet. | ||
| + | === SSH into App === | ||
Need to SSH into Heroku after app starts. | Need to SSH into Heroku after app starts. | ||
heroku ps:exec --app infinite-lowlands-38883 | heroku ps:exec --app infinite-lowlands-38883 | ||
| Line 167: | Line 168: | ||
Connecting to <span style="color:#34E2E2">web.1</span> on <span style="color:#8787D7">⬢ infinite-lowlands-38883</span>... | Connecting to <span style="color:#34E2E2">web.1</span> on <span style="color:#8787D7">⬢ infinite-lowlands-38883</span>... | ||
<span style="color:#729FCF">~</span> <span style="color:#8AE234">$</span> | <span style="color:#729FCF">~</span> <span style="color:#8AE234">$</span> | ||
| + | |||
| + | === Get the current Config === | ||
| + | cd server/config | ||
| + | cat config.php | ||
| + | |||
| + | <?php | ||
| + | $CONFIG = array ( | ||
| + | 'instanceid' => 'oczm2c0yitlu', | ||
| + | ); | ||
== Install NextCloud - Phase 3 == | == Install NextCloud - Phase 3 == | ||
Revision as of 18:12, 18 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 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."
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
Pushing Code to Heroku
git push heroku master
Do not setup the app just yet.
SSH into App
Need to SSH into Heroku after app starts.
heroku ps:exec --app infinite-lowlands-38883
Running this command for the first time requires a dyno restart. Do you want to continue? [y/n]: y Initializing feature... done Restarting dynos... done Waiting for web.1 to start... done Establishing credentials... done Connecting to web.1 on ⬢ infinite-lowlands-38883... ~ $
Get the current Config
cd server/config cat config.php
<?php $CONFIG = array ( 'instanceid' => 'oczm2c0yitlu', );