A simple devops project to demonstrate the use of Docker and jenkins with the help of GCP compute engine.
In this project we will create a flask web app and use docker to containerize it and deploy to gcp compute instance with the help of jenkins.
Create a Dockerfile with debian os and gunicorn module
Then upload it to github repo with git and gh cli
we will create our compute instance in the gcp cloud and deploy jenkins over it
make sure to allow network firewall rule for http protocol
after that install docker and push your image to docker hub
after that we will launch the jenkins to port 8080 and creat a simple freestype project
the configuration will look like this
after the build started we can launch our app on http://[ExternalIPofVm]:[Your app Port]