0

We are a small design company, I'm the only one to "code" (making small scripts/tools for the creatives)

I have a server on a local network.

On this server, I installed docker and docker-compose.

On this server I want to have a few containers running, one per service (gitlab, taiga, wiki.js, mattermost, wekan)

When setting the docker-compose.yml, How should I manage ports (and or any other settings) so that:

  • First (case study): (Let's say I just have one container running) when typing the host IP address in a web browser, it redirect to my service and display for example, /var/www/ if my service is a website
  • Second: when typing subdomain.myhostname in a web browser, it redirects to one specific service
Munshine
  • 402
  • 3
  • 14
  • Well, you can use another container with a nginx as a reverse proxy and configure all settings to serve it as a proxy. The container would cover all uses cases described above. – julian salas Aug 23 '18 at 14:02
  • 1
    After reading [this](https://stackoverflow.com/questions/224664/difference-between-proxy-server-and-reverse-proxy-server), it sounds exactly like what I need. Just to double-check if I understood the suggestion well, would [this kind of tutorial](https://www.thepolyglotdeveloper.com/2017/03/nginx-reverse-proxy-containerized-docker-applications/) be fulfilling my needs? – Munshine Aug 23 '18 at 17:17
  • Yeah thats tutorial is all of you need :). – julian salas Aug 23 '18 at 18:02

1 Answers1

0

It's a very broad question, strongly dependent on one's experience. From what I consider fast and reliable, as far as small environments are considered, you may want to take Rancher for a spin.

It's super easy to start with. What's more, there's a range of services like Gitlab or DokuWiki you can start with just one click. On top of that, you can configure a load balancer, that can perform the redirections you mentioned. I think it's one of the fastest options to get a functional and scalable stack. Definitely not the most stable one, compared to enterprise-grade OpenShift, but I think it'll do just fine.

I will not go through all the setup details as I believe it's not what the question is about, but you can start with setting up Rancher 1.6 docker server going step by step through the official doc guide. It's pretty straightforward - one bash command and you are up and running.

Openshift is a platform competing to Rancher. To my best knowledge, it's harder to work with, especially having no experience. It's more stable, that's for sure, alas requires more effort in general.

I intentionally omitted a few options as I took an assumption OP wants it working asap while still easily being re-configurable, stable, and GUI-manageable.

-- edit a few years later --

Rancher and Openshift are still actively developed and attract new users. Rancher released a stable v2 since my original answer, and so I no longer recommend looking at v1.6.

trust512
  • 2,188
  • 1
  • 18
  • 18
  • Thanks a lot for the elaborated answer! I'm going to have a look at Rancher. Although we are trying to keep it as simple as possible (thin stack and zero extra costs), we don't particularly need any GUI and we are willing to learn, as we have time for that. So would the reverse proxy solution mentioned by @julian-salas be another worthwhile option? – Munshine Aug 23 '18 at 14:24
  • Sure, that totally fine for the beginning, I just didn't want to suggest that, as from my experience with small companies, sooner than later they migrate to such grade environments as I elaborated on. So, in that case, my answer might eventually come in handy later on, as the requirements will grow a bit more. – trust512 Aug 24 '18 at 08:22