Skip to content

Instantly share code, notes, and snippets.

@poloey
Last active January 8, 2018 23:47
Show Gist options
  • Save poloey/7ba8fdb925e03e84164441e7182973d2 to your computer and use it in GitHub Desktop.
Save poloey/7ba8fdb925e03e84164441e7182973d2 to your computer and use it in GitHub Desktop.
ldh

deploying laravel in heroku

normal deploy

removing .env from .gitignore file

# to write Procfile
echo web: vendor/bin/heroku-php-apache2 public/ > Procfile
# to create heroku project
heroku create
# to set heroku app config
heroku config:set APP_KEY=$(php artisan --no-ansi key:generate --show)
# to push to heroku
git push heroku master 
# to open heroku website
heroku open

with migration file

# to add pgsql addons
heroku addons:create heroku-postgresql:hobby-dev
# to know config
heroku config

url structure

DB_CONNECTION=pgsql
username:password@host:port/database

heroku run bash

heroku run bash
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment