Docker based development

Soldato
Joined
1 Nov 2007
Posts
5,583
Location
England
Well the short version of the story is this. I need to develop a website and have a pretty good idea how I am going to do it. I'd call myself an intermediate level developer and since Python is my best programming language I think I am going to use that.

On the other hand I've never used Docker before in my development process. Someone told me about Git Lab which has an integrated CI / CD system and uses Docker and Kubernetes.

I'll be hosting my finished site on Microsoft Azure as they offer all the services that I require as well as supporting deployment using Docker and Kubernetes.

My question is this. If I build the website using Python and Django and use PostgreSQL as the database server should I include three Docker containers? One for Nginx or Apache for the HTTP server, one for Python and the Django website and one for PostgreSQL or should I use another method?

I'll need to do a lot of brushing up on my DevOps skills in this project but I want to make sure I am getting it right from the start.

If anyone has any suggestions I'd be grateful :). I'm installing Windows 10 Pro in a virtual machine so I can work on a clean system for development.
 
Associate
Joined
16 Aug 2010
Posts
1,365
Location
UK
No, everything for your site should be in the docker container with it. It's like a "self contained app". You might have a "global" nginx or apache, that forwards however to the required container.
 
Soldato
OP
Joined
1 Nov 2007
Posts
5,583
Location
England
No, everything for your site should be in the docker container with it. It's like a "self contained app". You might have a "global" nginx or apache, that forwards however to the required container.

Hmm. OK. That makes it simpler to build then.

I just bought a Docker course on Udemy because they are having a sale on where every course is £10 so I bought a few to get some skills in this area.
 
Associate
Joined
11 Jan 2003
Posts
844
Location
Loughborough
By default kubernetes pods are stateless. Pods can be freely created, restarted and destroyed by the cluster and so you shouldn't use them to store persistent data. It's recommended to connect to a remote service for storage. I've not used azure before but I'm sure they'll offer some managed postgres service you can use.

BTW if you want to play with kubernetes I'd highly recommend minikube ( https://github.com/kubernetes/minikube ). It'll allow you to run a cluster locally to get a feel for it :)
 
Back
Top Bottom