News for hackers. Stuff that matters.
Re:Best practices around creating production ready web apps ... by aprdm on Tuesday June 01, 2021 @06:16PM (#27362158)
How's it different than running things with pure docker or before docker? There were backups and no downtime deployments before docker became a thing... docker compose is already a layer above docker (but really just docker).
Re:Best practices around creating production ready web apps ... by merb on Tuesday June 01, 2021 @06:57PM (#27362537)
yeah but stuff like that is hard and not solved with compose, you can update your compose but that would result in downtime, so you can either do a/b (blue/green) deploys or you somehow reload the content inside the container?! everything that needs special tooling.
Re:Best practices around creating production ready web apps ... by aprdm on Tuesday June 01, 2021 @08:18PM (#27363238)
You can have a compose with multiple backend services and an nginx load balancer in it proxing back to it each one, then down/up each each backend service individually when upgrades for example..
Re:Best practices around creating production ready web apps ... by ta988 on Tuesday June 01, 2021 @09:44PM (#27363831)
Which may force you to handle two versions of databases schemes instead of a single migration. This adds complexity and sometimes 1min of down time is more acceptable than that additional work.
Re:Best practices around creating production ready web apps ... by aprdm on Tuesday June 01, 2021 @11:15PM (#27364406)
Yeah for sure, but I feel that's a software design problem and not directly related to using docker compose or not, you could have this same issue regardless of how you go about deploying it.
Re:Best practices around creating production ready web apps ... by rualca on Wednesday June 02, 2021 @02:35AM (#27365607)
> You can have a compose with multiple backend services and an nginx load balancer in it proxing back to it each one, then down/up each each backend service individually when upgrades for example..

Things are way simpler with Docker Swarm. You just run a single ingress controller as a separate stack and route all traffic internally.

If you use Traefik as your ingress controller, all you need to do is set labels in your docker compose files and everything just works.

There is absolutely no reason or excuse to use docker compose in anything resembling production.

Re:Best practices around creating production ready web apps ... by simongray on Wednesday June 02, 2021 @04:12AM (#27366199)
> There is absolutely no reason or excuse to use docker compose in anything resembling production.

I work at a university where I make an app meant for maybe a couple of concurrent researchers. Am I seriously supposed to set up Docker Swarm for this or is it OK with you if I run my little setup using Docker-compose on the tiny server that the university has provisioned for me?

Seriously, why do so many people on HN have to act like the entire world of software developers is busy making the next Facebook? I'm sure many (most?) people are making tiny things meant for tiny audiences.

Re:Best practices around creating production ready web apps ... by croon on Wednesday June 02, 2021 @04:32AM (#27366319)
> Seriously, why do so many people on HN have to act like the entire world of software developers is busy making the next Facebook? I'm sure many (most?) people are making tiny things meant for tiny audiences.

I agree generally, but playing devil's advocate for GP, what I think they meant is that swarm can be run on a single node with little downside/complexity and a lot of upside from docker compose.

See for example:

https://jarredkenny.com/single-node-docker-swarm/

https://devopstuto-docker.readthedocs.io/en/latest/docker_sw...

Re:Best practices around creating production ready web apps ... by simongray on Wednesday June 02, 2021 @05:17AM (#27366583)
Thanks for the links. I was not aware that it could be run on a single node. Still, the benefits are unclear to me. I guess I will research it some more.
Re:Best practices around creating production ready web apps ... by rualca on Wednesday June 02, 2021 @07:25AM (#27367379)
> Still, the benefits are unclear to me.

Manage deployments as stacks, which support history and backtrack deployments.

Blue-green deployments.

Frankly, it boggles the mind how people put to production devtools that are barely managed to be secure when deployed locally, when alternatives are both simpler to deploy and more capable.

Re:Best practices around creating production ready web apps ... by simongray on Wednesday June 02, 2021 @11:46AM (#27370044)
I am in charge of every single thing from devops to data modelling to backend web services to frontend apps to design and testing to responding to inquiries from users of a dozen web services. Does that boggle your mind too? That is the reality of my job. I don't have the time to be an expert in every single area when I am the one who has to do everything.

I'm sure you're great at setting up servers. That is probably the part of my job I dislike the most, but it's something I have to do, so I do it.

Re:Best practices around creating production ready web apps ... by croon on Wednesday June 02, 2021 @08:16AM (#27367767)
The charitable assumption is that people use the (best) tools they're aware of. Discovery can be really hard today.
Re:Best practices around creating production ready web apps ... by KurtMueller on Wednesday June 02, 2021 @08:34AM (#27367937)
Docker has documentation on how to deploy compose apps to services like Azure Container Instances or Elastic Container Services. It's specifically for using compose in production.

https://docs.docker.com/cloud/aci-compose-features/ https://docs.docker.com/cloud/ecs-compose-features/

Re:Best practices around creating production ready web apps ... by aprdm on Wednesday June 02, 2021 @10:55AM (#27369413)
That looks much more complicated than scp a yaml file and run a single command. Which is all you need for a lot of real production apps.