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
  • 362
  • 1
  • 13
  • 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 companies are taken into consideration - you should orchestrate your environment using Rancher (preferably v1) and configure everything using Rancher. It's super easy to start working with. Whats more, you can start off Wekan, Gitlab, some DokuWiki and Taiga with just one click - on top, you can configure an load balancer, that can effectively perform the redirections you mentioned. I think it's your fastest option, not the most stable one (considering OpenShift*), but I think it'll do just fine.

I will not go through all the process 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 and super easy to get started - one bash command and you are up and running.

*Openshift is a competition for Rancher. According to my experience, it's much harder to work with while having no experience. It's more stable as I hear, yet requires more work each time a change is needed - comparing to Rancher.

Intentially not mentioning other options as I took an assumption that OP wants it working asap while still easily re-configurable, stable but not enterprise grade and generally, GUI manageable.

trust512
  • 1,723
  • 1
  • 16
  • 14
  • 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