Split Docker container in App / DB / Web

Hi,

I am severly confusied by how Gitlab, especiall the official gitlab-ce Docker container, is working. Usually, I expect Docker containers to contain an Application which has an API that listens on some port. I can then optionally add an external database container, and if I want SSL termination, add an Nginx container which proxy_passes to the Docker container of the application.

Currently, I’d like to run GitLab and Mattermost in a Dockerized environment. Both seem to ship with Nginx, but obviously one Nginx container is enough. What I’m trying to do is have one Nginx container (acting as a reverse proxy), a Mattermost application container, a GitLab application container, and then 1-2 database Containers. I’m not able to figure out how to decouple GitLab from it’s bundled Nginx. I was expecting it to just be a Ruby Application listening on some port, but the documentation suggests some really strange things, like configuring the correct user when using an external webserver, using something called phusion passenger, etc.

TL;DR: How do I run GitLab with Nginx in a different Docker container?