How to set up Review Apps with Docker

I am having a lot of trouble understanding how Review Apps are supposed to work, mostly because the documentation does not do a good job of describing what supporting infrastructure needs to be in place for Review Apps to work.

This is our setup currently:

  • 4 runners, all running CentOS 7 with the only notable package installed being Docker
  • All CI stages run using the Docker executor, with a custom Docker image that we have

What do we need to do to get Review Apps working with dynamic environments? Do we need a dedicated runner? Do we need to have nginx installed? Can we deploy the app in a container and have an nginx container running alongside it? How are we supposed to do DNS?

It is not obvious to me what the answers are to these questions, and it would be great if someone can guide me as to how to set up Review Apps, since we would really like to get it working.

Maybe this can help https://about.gitlab.com/2017/07/11/dockerizing-review-apps/.

I looked at that, but we don’t have an private Docker Registry set up. If there’s really no easier way, then I can look into setting one up and following that article.

You can easily use GitLab’s built-in Container Registry.

This is how I made it work. You can use it as an example for your own Project: