These directions are for setting up a new Heroku pipeline and adding 2 apps to it: staging and production. This is intended for hosting a "static" HTML site, not for Lar $ .
-
Configure your Laravel Homestead environment. Those directions are found elsewhere.
-
If you haven't already done so, create an account at heroku.com.
-
If you haven't done so previously, install the Heroku Toolbelt on your machine.
-
If not done previously, install the Heroku pipeline addon:
$ heroku plugins:install heroku-pipelines
-
Create an empty repository in Bitbucket: https://bitbucket.org/repo/create.
-
Map the Git repository on your local environment:
$ cd ~/Code $ mkdir keppnerhaus $ cd keppnerhaus $ git init $ git remote add origin [email protected]:rkeppner/keppnerhaus.git
Execute these commands in your local environment, to add the Heroku remotes for promotion:
$ heroku apps:create -b https://github.com/heroku/heroku-buildpack-php -r production keppnerhaus
$ heroku pipelines:create -s production -a keppnerhaus keppnerhaus
$ heroku apps:create -b https://github.com/heroku/heroku-buildpack-php -r staging keppnerhaus-staging
$ heroku pipelines:add -s staging -r staging keppnerhaus
$ git config heroku.remote staging
-
Procfile
Directives for Heroku environment configuration:web: vendor/bin/heroku-php-nginx -C nginx.conf -
nginx.conf
Nginx configuration for the Heroku environment:# Nginx directives can be added below, as needed. location / { index index.html index.php; }
-
composer.json
Composer configuration file:{ "name": "rkeppner/keppnerhaus", "description": "Keppnerhaus corporate website.", "license": "proprietary", "require": { "php": ">=5.6" } } -
index.php
PHP home page. -
index.html
HTML home page. -
.gitignore
Instruct Git to ignore dependencies installed by Composer:/vendor
-
Commit changes to staging via Git (command line instructions given below, but this can also be done in SourceTree):
$ composer update $ git add -A . $ git commit -m "Added Heroku configuration." $ git push -u origin master $ git push staging master -
Share/QA the results at: http://keppnerhaus-staging.herokuapp.com
-
When approved, promote the changes to production:
$ heroku pipelines:promote -r staging -
Double-check site at: http://keppnerhaus.herokuapp.com