I am deploying my Laravel application to Heroku. I set up a pipeline for my application connecting to GitHub. I configured it to deploy again automatically whenever a new commit found on the develop branch. The thing is I need to configure to run some other commands on each deployment, for example to migrate my database.
I cannot find a option to set up those commands in Heroku UI. How can I do that?
I found Heroku's release phase, but I would like to configure this through the Heroku dashboard. With a release phase I have to put the commands in the Procfile
. It is hard to run and manage the commands based on the environment.
For example, in my testing environment I might want to run php artisan migrate --seed
, but in my production environment I might run my migrations without seeding the database.