Artisan command on deploy #173
|
I have an artisan command which needs to use the production database. I want to run it once every deploy. Is there an optimal way to do this? |
Answered by
jaydrogers
Oct 6, 2025
Replies: 1 comment 1 reply
|
I would add a start up script to the image. Make sure your script checks the artisan command exists before running it, and make sure it has proper error handling if something fails during start up. |
1 reply
Answer selected by
akulmehta
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would add a start up script to the image.
Make sure your script checks the artisan command exists before running it, and make sure it has proper error handling if something fails during start up.
https://serversideup.net/open-source/docker-php/docs/customizing-the-image/adding-your-own-start-up-scripts