Joska99 / Targil1090

Helm chart that Deploy Static HTML page By Python Flask

Home Page:https://hub.docker.com/repository/docker/joska99/flask-app/general

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker container with Python Flask app

  • In 'app' directory Python flask 'app.py' takes HTML files from "templates" directory
  • With CI pipeline to Build and Push Docker image to DockerHub CI - Build and Push Docker Image to joska99/flask-app
  • With Helm chart
  • With CD delivery by ArgoCD

To run docker container

  • Build Docker image, from root of the repository directory run this command
docker build . -t flask-app 
  • Run Docker Container
docker run --name flask-app --rm -p 8000:5000 -t flask-app
  • Connect to the Container on localhost:8000 or localhost:8000/home

  • Push Docker image

docker tag flask-app joska99/flask-app:latest
docker push joska99/flask-app:latest

Run Helm

  • Create Helm Chart
helm create "helm-chart"

Chart.yaml - Metadata for chart
values.yaml - Define values for chart
templates/ - Contains templates files for Kubernetes resources

  • Create Helm package
helm package ./helm-chart
  • Install Helm package
helm install flask-app  ./python-flask-chart-0.0.1.tgz
  • Delete Helm Chart
helm delete flask-app

Apply ArgoCD deploy pipeline

  • Run scripts from root directory of repository to create "app", "argocd" NameSpaces and Deploy ArgoCD service and AppicationSet for deployment
. ./argocd/scripts.sh
  • Connect to ArgoCD GUI

argocd-service is IP for GUI accessible on port 80/443/TCP

kubectl port-forward -n argocd svc/argocd-server 8080:443

User Name is Admin
Get password

kubectl get secret argocd-initial-admin-secret -n argocd -o yaml | grep password: | awk '{print $2}' | base64 --decode

"grep" to find the password line, "awk" to output second word, "base64 --decode" to decode the password

About

Helm chart that Deploy Static HTML page By Python Flask

https://hub.docker.com/repository/docker/joska99/flask-app/general


Languages

Language:HTML 37.7%Language:Shell 27.2%Language:Python 19.0%Language:Dockerfile 16.1%