Deploying GitMate¶
Note
Make sure you have docker installed before you proceed any further.
1. Getting required images¶
Our setup requires four containers to be run in parallel. A postgres
container, one for rabbitmq
, a couple more for GitMate backend and celery
workers. These are nonetheless captured by docker-compose
. We also require
the following two images which work with the code analysis plugin. They are
hosted on GitLab container registry. Follow these steps to pull them.
Login GitLab container registry with your GitLab credentials.
docker login registry.gitlab.com
To pull the images, run:
docker pull registry.gitlab.com/gitmate/open-source/coala-incremental-results
docker pull registry.gitlab.com/gitmate/open-source/result-bouncer
2. Using docker-compose¶
All our services are spun together with docker-compose
sevices. You can view
and modify the configuration here at docker-compose.yml.
The required environment variables can be setup at docker/environment.
Build the images, by running the command inside the clone gitmate-2 directory.
docker-compose build
To start the containers, run:
docker-compose start
You can now attach to any containers to get their debug logs. for e.g. to check worker logs, run:
docker attach gitmate2_worker_1
Or, you could just upstart and build at the same time with continuous logs.
docker-compose up
Note
The step below is only helpful if you want to run locally and test gitmate containers.
3. Expose your local server to the internet¶
We recommend using localtunnel to get a proper deterministic URL to test GitMate with.
To expose your local server, run:
lt -s <domainname> port 8000