Make sure your SQLite database is at
database/database.sqlite and remove the
"ext-pdo_sqlite": "*"to the
composer.json. You can read about how to enable various PHP extensions on Heroku here.
- Create a Heroku account.
- Create a new app in the Heroku dashboard and link your GitHub repo to it.
- Click the “Enable Automatic Deploys” button. Now, every time you push to your GitHub repo, Heroku will automatically deploy your app.
- Create a file in your repo called
Procfile, with the following line:
web: vendor/bin/heroku-php-apache2 public/. Push it up to your repo. This will trigger Heroku to deploy your app.
- Navigate to the Settings tab, and add the following environment variables:
APP_ENV=development APP_KEY=whatever your key is here ... APP_DEBUG=true APP_LOG_LEVEL=debug DB_CONNECTION=sqlite
You’re all set! Click on the “Open app” button and test all of your routes!
Disclaimer: Any viewpoints and opinions expressed in this article are those of David Tang and do not reflect those of my employer or any of my colleagues.