Hacker News new | ask | show | jobs
by argentinian 1260 days ago
I'd like to ask the questioner and to anybody who would like to comment:

As docker compose is only for single node deployments, how is your workflow from dev to production? If your containers are deployed in something like Kubernetes in production, isn't inconvenient to use docker compose for development?

3 comments

> single node deployments

Docker Compose is for a single developer deployments [0].

Every time I mess with Compose and I need for the things to be services[1] I just give up after the some amount of reboots, YAML mangling, cursing, documentation reading, keyboard throwing. I just rebuild it as a Swarm service and it works. Till Swarm (on a single node) breaks, but this is another can of worms.

[0] On developer's machine. On developer's distro.

[1] be started after reboot, successfully start after reboot, with all dependencies. It doesn't seems like a high bar.. but Docker Compose fails at it.

Nothing wrong within using compose in production. As for restarts, I've never had any issues with it.
Same here. I deploy on VPSs with compose and restart works fine. Maybe there are cases in which it does not work; I have quite a lot of issues on local mac m1. But there I don’t really care as it’s easy to just kill and restart docker.
"I never had it a problem with N => N never happens" amirite?
I usually use Docker compose locally, and then I deploy to system containers.

Nearly all my time is spent on developing my own software, so it's not like I make infrastructure changes every month. I set up a deployment pipeline that deploys it the way I want, and then I don't touch it until my infrastructure needs to change.

So I'm usually not even using application containers in production, Docker is just a simple way to simulate production services so that anyone can run a single command and have a complete dev environment.

Docker swarm works well with compose.

We don't switch technologies. So it's compose all the way to production.

As for Kubernetes, developers currently don't run it locally, they just run the app/apps they're developing from their IDEs and connect to a 'build' environment for the other services/databases (far from ideal)