0

I hope you are well and healthy. I have deployed a docker-compose file that contains nginx-proxy used with letsencrypt for a multi-container multi-project deployment on a single VPS. However, it becomes quite impractical especially given that the docker-compose file grows when adding multiple projects. For example, in my case I have deployed portainer and netdata on the same stack and facilitated in a total of 4 containers in that stack. I want to deploy zammad (https://zammad.org/) which is an opensource ticketing project on the same server but not necessarily on the same stack. I am not sure if I am doing this wrong but they have a docker-compose file themselves which prompted me to think it should be a separate stack. I do want nginx-proxy and letsencrypt to work with this project as well to be able to redirect a subdomain to zammad, however, docker finds it to be conflicting with the already deployed versions of nginx-proxy and letsencrypt in the 1st stack. How do you suggest to proceed? Do you think it's practical to just add up the contents of the docker-compose file of zammad to my 1st stack docker-compose file?

Thanks!

s.khetcho
  • 113
  • 7
  • I don't think compose is really suited for production and lots of services like that. Maybe look into something like Kubernetes. There are also some projects particularly for single node deployments i.e. k3s. – The Fool Oct 03 '20 at 00:41
  • hmm I see, do you think a swarm cluster is a better idea if I have to use docker then? Or should I just go with Kubernetes? – s.khetcho Oct 03 '20 at 00:46
  • Swarm is geared for multinode. If you want to stick to compose you can have multiple compose files for your stacks but you can use the same network driver so you can use nginx to proxy all of them. Or you can use the host network for all containers' which will also allow you to proxy everything but is less secure. – The Fool Oct 03 '20 at 01:32
  • Thanks for the explanation @TheFool, how would you go by to configure the network drivers to be used across multiple stacks? I have deployed nginx within the 1st docker compose file. Is there a way to set the network adapter from the 2nd docker compose file or am I missing the point here? – s.khetcho Oct 03 '20 at 02:13
  • @s.khetcho [the primary operator is Kubernetes ever since Mirantis bought Docker Enterprise](https://www.mirantis.com/blog/mirantis-acquires-docker-enterprise-platform-business/). There is a chance that development of swarm be discontinued in the near future. – masseyb Oct 03 '20 at 08:12
  • @TheFool using docker-compose in production imho depends on the services you’re running. Docker on a single node becomes a an issue when you need to scale the application as you’re limited be the resources allocated to the node. – masseyb Oct 03 '20 at 08:17
  • Thanks both for your help and insight on this problem. As currently, it's a single docker node I will continue using docker-compose and when I introduce new VPS servers I will switch to Kubernetes. I am not sure if you think this approach is flawed. Shall I go with Kubernetes right from the start by having a single master node and then scale over time or make the switch later. The determining factor for this decision comes on which approach would save time overall – s.khetcho Oct 05 '20 at 20:32

0 Answers0