darki73
darki73

Reputation: 1127

How to proxy Gitlab in Docker through Traefik

I have a single server, which runs many Docker containers, couple of them, for my main website, other 2 are shared MariaDB and Redis, also one of them is Traefik and the other is Portainer (i still have problems with docker cli).

So the question arises, how to run Gitlab in Docker and proxy it through Traefik?

I do need my 22 port for SSH connectivity from my main machine to my server, port 80 and 443 is taken by the Traefik (to handle proxy and https), so all of 3 ports required by the Gitlab are taken by the proxy + system.

What is correct way of creating Dockerized Gitlab instance with Traefik is a reverse proxy?

And the other question, how the runner (for CI/CD) will be working on the Dockerized instance? (The Xzibit way? "I've created Docker instance for you so you can run Docker inside Docker which can also run Docker?")

Upvotes: 1

Views: 3658

Answers (1)

Funky Penguin
Funky Penguin

Reputation: 189

Here’s an example of GitLab behind Traefik, both the UI and the registry : https://discourse.geek-kitchen.funkypenguin.co.nz/t/a-complete-gitlab-traefik-config/554/11

In terms of what to do with SSH, you can either renumber your existing SSH daemon to use a port other than 22, or just use a different port (i.e. 2222), and tell GitLab that you’ve used a non-standard SSH port by setting the GITLAB_SSH_PORT env variable.

Here’s an example of running the runner as a container: https://geek-cookbook.funkypenguin.co.nz/recipes/gitlab-runner/

Upvotes: 1

Related Questions