This article covers the differences between both commands very well.
docker-compose up deploys everythign to the same node. docker stack deploy... will let swarm decide where to place each container.
If you're starting a local dev instance then you're technically[1] using the right command. But if you're talking about a production (or production-like) deployment, then your boss is doing the right way.
[1] I'm a big believer in using the same commands / docker-swarm modes in dev than in prod, but that's a different conversation.
~6services x 1instance - and still using docker swarm
Ok, here are my 2 cents:
As far as I know, Docker Compose is designed to orchestrate services on a single Docker host or instance. This basically allows you to replicate the full app environment and makes it easy to test the app locally or in a CI environment.
On the other hand, Docker Swarm is designed for running containers at scale. If you have just one node, you don't really need the cluster engine to manage it. So it all depends on your boss 🤔 Is he planning to scale the application to multiple instances in the near future or is he just playing around with Swarm? You're probably overkilling the whole thing if you plan to maintain just a single instance.
Disclaimer: I'm not a dev, but a big DevOps enthusiast who finds these things super interesting, maybe someone else will correct me :)
Ramiro Berrelleza
Co-founder & CEO at Okteto
This article covers the differences between both commands very well.
docker-compose updeploys everythign to the same node.docker stack deploy...will let swarm decide where to place each container.If you're starting a local dev instance then you're technically[1] using the right command. But if you're talking about a production (or production-like) deployment, then your boss is doing the right way.
[1] I'm a big believer in using the same commands / docker-swarm modes in dev than in prod, but that's a different conversation.