Member-only story

You Can Automate DevOps Yourself Using GitLab CI And Docker-Compose

Sean Bradley
5 min readMar 31, 2019
Overview of the Finished GitLab CI Process

You are here because you want to set up an auto deployment pipeline for your amazing full stack project.

In this article I will show you how to do this yourself.

The project I will use is a prebuilt NodeJS API, which when run, is exposed behind a Nginx proxy, and containerised using docker-compose. The project exists in GitHub under several branches Dev, UAT, Staging and Production. You can create and manage your branches any way you wish.

The NodeJS API Application as seen from .gitLab-ci.yml

The code is hosted at https://github.com/Sean-Bradley/Seans-TypeScript-NodeJS-CRUD-REST-API-Boilerplate

The finished process will be,

  1. You commit and push your changes to a GitHub branch
  2. GitLab CI will detect the latest changes on GitHub and mirror the changes to your GitLab repository.
  3. GitLab CI will then trigger the GitLab Runner to start the pipeline for the particular branch, which will pull the latest code, build and run the docker-compose process.
  4. If no errors occurred during build and deployment, your latest commit will now be live.

--

--

Sean Bradley
Sean Bradley

Written by Sean Bradley

Developer of real time, low latency, high availability, asynchronous, multi threaded, remotely managed, fully automated and monitored solutions.

Responses (4)