Member-only story
You Can Automate DevOps Yourself Using GitLab CI And Docker-Compose
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 code is hosted at https://github.com/Sean-Bradley/Seans-TypeScript-NodeJS-CRUD-REST-API-Boilerplate
The finished process will be,
- You commit and push your changes to a GitHub branch
- GitLab CI will detect the latest changes on GitHub and mirror the changes to your GitLab repository.
- 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.
- If no errors occurred during build and deployment, your latest commit will now be live.