Deploying projects w/i a monorepo? #2691
Unanswered
claytonrcarter
asked this question in
Help needed
Replies: 1 comment 2 replies
-
There is a feature request to checkout only a subdir #2570. This will be ideal for this case.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Aside from manually rewriting a recipe and/or all of it's tasks, are there any recommendations for deploying projects that reside w/i subdirectories of a repository?
Deploying the code and setting up the symlinks seems to be pretty easy, as is getting the web server to point to the correct location, but once we start using recipes (eg
laravel
,npm
, etc) things get messy. For instance, thenpm:install
task just doesrun("cd {{release_path}} && {{bin/npm}} install");
, but we would need it tocd {{release_path}}/our-laravel-app
. It's pretty easy to just overwrite this particular task, but working w/ thelaravel
recipe is more complicated: most of the tasks in the Laravel recipe use theartisan()
function, which is hard coded to look for either{{current_path}}/artisan
or{{release_or_current_path}}/artisan
. Becauseartisan
is a plain PHP function, though, it can't just be overwritten because that triggersPHP Fatal error: Cannot redeclare Deployer\artisan()
.The quick and dirty way around this is to just copy the laravel recipe into each of our projects and alter 2-3 lines of code to point to, eg,
{{release_or_current_path}}/our-laravel-app/artisan
. This is doable, of course, but cumbersome.Are there any easier ways to do this?
For context, our structure is something like this:
We have been happily using deployer for years w/ these as separate projects in separate repos, but we are looking at consolidating all of our projects into a monorepo to reduce the burden of managing all of these. The general idea is that, instead of having a repo w/ a single Laravel app in it, we would have one repo w/ subdirectories, each w/ a separate Laravel app (or shared package) w/i it.
Beta Was this translation helpful? Give feedback.
All reactions