Server Setup
- Make sure Required packages are in
"require": {
brew install heroku/brew/heroku heroku login
- Make sure composer, php and git commands working
- Go inside Laravel Project and create Procfile
echo "web: vendor/bin/heroku-php-apache2 public/" > Procfile git add Procfile git commit -m "Procfile for Heroku"
- Create Heroku Server
heroku create laplus-heroku heroku buildpacks:set heroku/php heroku config:set APP_KEY=$(php artisan --no-ansi key:generate --show)
- go to config/app.php and set 'log'=>'errorlog'
git commit -m "Heroku app is ready" git push heroku master --app laplus-heroku
- Start server
heroku open --app laplus-heroku
2. Database Setup
- Add Add-on JawsDB Maria
- Go to https://dashboard.jawsdb.com/maria/dashboard and use same credentials for ENV in
- https://dashboard.heroku.com/apps/laplus-heroku/settings --> Config Vars
DB_CONNECTION=mysql DB_DATABASE=xxxxxxx DB_HOST=xxxxxxx DB_PASSWORD=xxxxxxx DB_PORT=xxxxxxx DB_USERNAME=xxxxxxx APP_URL=https://laplus-heroku.herokuapp.com REDIRECT_HTTPS=true
- Migration Command
heroku run --app laplus-heroku php artisan migrate:refresh --seed
Leave a Reply