DefangLabs / defang

Defang CLI and sample projects. Defang is a radically simpler way for developers to develop, deploy, and debug cloud applications.
https://defang.io
MIT License
21 stars 5 forks source link

Local dev vs Defang (Prod) Configurations #292

Open raphaeltm opened 2 months ago

raphaeltm commented 2 months ago

We need to document the best way to run different configurations in development and production. Even things like environment variables etc. Sometimes you want to add a NODE_ENV=development in dev andNODE_ENV=production in prod. We can tell people to do something like:

defang compose up -f compose.yml -f compose.defang.yml

But that's pretty annoying.

I think it would be nice if the defang CLI looked for a *compose.defang.y*ml file by default, and if it exists, use it to override values in the main compose file.

It's not a full development workflow, but I think it's a decent starting point.

lionello commented 1 week ago

We added support for Compose "profile" and always have profile=defang set.

lionello commented 1 week ago

compose.defang.yml looks a lot like the compose.override.yml which Docker always loads automatically.