News for hackers. Stuff that matters.
Re:Best practices around creating production ready web apps ... by mdoms on Tuesday June 01, 2021 @04:01PM (#27360477)
I don't understand his "Avoiding 2 Compose Files for Dev and Prod with an Override File" point. He just says it, but never justifies it.
Re:Best practices around creating production ready web apps ... by reportt on Tuesday June 01, 2021 @04:17PM (#27360690)
The idea is that you have a core structure that is used in both local/dev environment and the prod environment, with just the override applying changes. For example, your local override might have the "build" configuration, whereas the dev environment or production environment docker-compose should not have that configuration (assuming you are pulling from a private registry). That single core docker-compose.yml can be copied to any environment it needs and it should just run the app, but if you really, really need to override something for a specific reason, it's not hard to do it without modifying the core docker-compose.yml.
Re:Best practices around creating production ready web apps ... by nickjj on Tuesday June 01, 2021 @04:55PM (#27361162)
Hi,

It's mentioned on video and briefly in the blog post. It's so you don't have to duplicate a bunch of services between 2 files while you slightly change a bit of configuring for those services depending on the environment you're in, or even running different containers all together (which is the problem the override file solves).

Re:Best practices around creating production ready web apps ... by trinovantes on Tuesday June 01, 2021 @04:17PM (#27360691)
Probably so you don't have duplicate settings in docker-compose.prod.yml and docker-compose.dev.yml when the only difference is probably just 1 line specifying NODE_ENV etc.