How can I connect multiple Docker Compose deployments across different hosts without using Swarm or Kubernetes?

0
7
Asked By TechNinja42 On

I'm running multiple Docker Compose deployments on various Linux machines, and I'm looking to connect them within a single network. However, I want to keep the deployments independent across different servers and not use any orchestration tools like Swarm or Kubernetes. I'm curious about the best methods to achieve a single network visibility for certain Docker instances, while still allowing for separate deployments. Any advice would be appreciated!

3 Answers

Answered By DockerDude99 On

It sounds like you're trying to achieve something Docker isn't really designed for without orchestration. One option is to use the `network_mode: host` configuration. This way, your containers can connect to each other like regular hosts, but you'll have to manage the network setup manually outside of Docker. Just be aware that this approach might complicate things a bit.

NetworkingNerd77 -

Yeah, I agree! It's definitely a bit of networking work outside of Docker if you go that route.

Answered By CloudWizard8 On

If you're not keen on orchestration tools, maybe look into setting up a macvlan network. This would allow you to create a shared VLAN ID between your hosts, but you'll need to handle the external network controls yourself.

NetworkGuru10 -

Vxlan could also be an option here to consider, especially if you're looking for something more flexible!

Answered By ProxyMaster3000 On

Using a reverse proxy can help too! If each server has its own service running, consider using something like Nginx or HAProxy to manage the traffic across those servers. This could give you a clearer flow for external access while maintaining individual deployments.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.