Replies: 1 comment
-
|
I added some extra docs to hopefully help with this that will be available with v4: https://280-create-a-frankenphp-vari.serversideup-php.pages.dev/open-source/docker-php/docs/customizing-the-image/adding-your-own-start-up-scripts#running-custom-artisan-commands I am hesitant to add commands to be executed from an environment variable (because that could lead to weird security stuff), but in your case I would:
I hope this helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the serversideup/docker-php image to run a Laravel app that uses
stancl/tenancyfor multi-tenant database support.The default automation script (entrypoint.d/50-laravel-automations.sh) runs central migrations via
php artisan migrate --forceand then proceeds to cache config, routes, views, etc. (link to script).However, Laravel Tenancy also requires tenant-specific migrations via:
Question
Is there an officially supported or recommended way for inserting additional artisan commands — specifically tenants:migrate — before caching takes place?
Should i disable automations, duplicate the entire (entrypoint.d/50-laravel-automations.sh) and run
artisan tenants:migratein that file?Feature Suggestion
It would be awesome if the image supported additional artisan commands through an environment variable like:
…which could be executed right after the main
migrate --forcestep and before caching starts.This would allow tenancy and other similar packages to hook into the automation cleanly.
Beta Was this translation helpful? Give feedback.
All reactions