Is it possible to define custom profiles in Duct? My use case is that I'd like to have several variants of dev profiles.
You can add profiles in dev.clj
But they need to drive from :duct/profile iirc
In your duct_hierarchy.edn
you can add the following:
{:myapp.profile/dev [:duct/profile]}
This will make sure that :myapp.profile/dev
is derived from :duct/profile
.
Next, in your dev.clj
file, you will want to add this new profile:
(def profiles
[:myapp.profile/dev :duct.profile/dev :duct.profile/local])
And finally, you will want to include it in your config:
:myapp.profile/dev #duct/include "myapp/my-dev.edn"
Does this help?Thanks, it's strange because I'm fairly sure I tried that... let me try again.
This is wat we currently use at work, I don't think I skipped any steps. We use this to include profiles from dependency libraries
OK it worked, thanks @kevin.van.rooijen! I don't know what I did wrong the 1st time I tried that.
Good to hear! Glad it's working now 🙂
we do this extensively; there are some gotchas to do with resolution order of profiles though… they don’t currently happen in the order specified by that profiles
vector; but by their own dependency order with ties resolved alphabetically
This is something I’d like for duct to change
Yeah, ordering in Duct is a bit of an issue. Same problem with Ataraxy middleware (although that's an Ataraxy issue, not Duct)
The Duct configuration should get a bit of a revamp before 1.0 though. Would be nice to fix these things by then