This is part 2, I’d recommend checking out Part 1 of Help Me Understand Containerisation (Docker)
We have gone over the development workflow – in a django context – and it was quite a hefty chunk. Now let us look at continuous integration with gitlab and containers.
The Container CI Workflow
We are going to use gitlab for Continuous Integration. Gitlab is closely aligned with a container based development workflow.
A: I use gitlab for my ci .. so that part will depend on gitlab ..
A: but containers do make that easy .. cause you just need to build the container .. and then you can do everything inside the container
Let’s dive into container based CI with gitlab:
The New Trend in Continuous Integration
- Create an application image.
- Run tests against the created image.
- Push image to a remote registry.
- Deploy to a server from the pushed image.
Importantly you will need to enable the container registry if you have a private gitlab instance, you can do that with the following admin documentation for enabling the container registry.
Step 1 is to make a
The Container Deployment
Where should you DB and session storage live?
What is the backup strategy?
Lets do some autoscaling.
Docker Compose docs for production gives some good tips on deploying to production.