Replies: 1 comment
|
This seems to be inline with an existing discussion: https://github.com/orgs/wardenenv/discussions/793 |
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.
Warden allows to quickstart php environment.
But current stack is limited to built-in templates https://github.com/wardenenv/warden/tree/main/environments and images.
Although we can customize via .yaml overrides or use type
localto have fully custom environment, it's not really portable solution.What if we could install environment template from a git repo?
For example we create a new warden project and configure it like this:
the environment can even be versioned.
technically it would work the same way as now. All extension points would be preserved.
Warden would clone the template into local storage like
$HOME/.warden/env-templates/<versioned-template>Everything else would just work same.
I'd summarize this feature as advanced and portable
WARDEN_ENV_TYPE=localWhy not just commit
.wardenfolder inside a repo?WARDEN_WEB_ROOT=/sourcecustom mount path. Hence one can have prebuilt environment for some framework without touching framework itself.My PoC
-- The Mage-OS cloned as is to
./sources-- The custom reusable template based on FrankenPHP classic mode and related services is used.
warden-env.yamlOpen questions
Would anyone use this feature? Would it be useful to you?
How to make it more opinionated and play well with defaults and customizations?
For example the template may name some services different causing warden incompatibility. Like naming the shell or debug containers.
So project level override can be needed
Warden and template can evolve independently. The template can behave like a package that require
min_warden_version >= 16global vs project service boundary. Now we have
warden spxorwarden valkeyorwarden dbglobal commands that only compatible with current environments. SPX cannot be used on a node.js project.Technically can be mapped to the template or exposed from it to the project globals
Any alternative approaches?
If enough feedback gathered and there are people willing to review and test it I can open PR with what I have now.
All reactions