Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
1) Create a new laravel instalation
-> composer create-project laravel/laravel
Or just use an existing project
2) Create a file named Procfile (without extension) in root laravel folder
2.1) Add this line:
-> web: vendor/bin/heroku-php-apache2 public
3) Install Heroku Toolbelt
4) Initialize repository
-> git init
-> git add -A && git commit -m "Initial commit"
5) Create the Heroku app (forcing eu region)
-> heroku create --region eu
6) Allowing Heroku to recognize PHP installation
-> heroku config:set BUILDPACK_URL=
7) Deploy your code to the Heroku app
-> git push heroku master
8) Instead add all the .env variables 1 by 1, install this plugin to that job for us:
-> heroku plugins:install git://
9) Then just add the .env correctly and run the followin command:
-> heroku config:push
10) Install all the dependencies:
-> heroku run composer update
-> heroku run php /app/artisan migrate:refresh
Force app rebuild (empty push)
-> git commit --allow-empty -m "empty commit"
-> git push heroku master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment