All Projects → testdrivenio → Flask Vue Kubernetes

testdrivenio / Flask Vue Kubernetes

Flask + Vue + Postgres + Docker + Kubernetes

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Flask Vue Kubernetes

Authlib
The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
Stars: ✭ 2,854 (+1109.32%)
Mutual labels:  flask
Autoline
建议你使用更新的AutoLink平台
Stars: ✭ 227 (-3.81%)
Mutual labels:  flask
Micromsg Bot
微信表情机器人
Stars: ✭ 230 (-2.54%)
Mutual labels:  flask
Flaskmovie
【正在改版开发中,请勿使用!】Flask电影网站前台+后台管理。
Stars: ✭ 221 (-6.36%)
Mutual labels:  flask
Flask Paginate
Pagination support for flask
Stars: ✭ 223 (-5.51%)
Mutual labels:  flask
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+1097.03%)
Mutual labels:  flask
Uwsgi Nginx Flask Docker
Docker image with uWSGI and Nginx for Flask applications in Python running in a single container. Optionally with Alpine Linux.
Stars: ✭ 2,607 (+1004.66%)
Mutual labels:  flask
Swaglyrics For Spotify
📃 Get lyrics of currently playing Spotify song so you don't sing along with the wrong ones and embarrass yourself later. Very fast.
Stars: ✭ 235 (-0.42%)
Mutual labels:  flask
Flask Common
A Flask extension with lots of common time-savers (file-serving, favicons, etc).
Stars: ✭ 227 (-3.81%)
Mutual labels:  flask
Snap N Eat
Food detection and recommendation with deep learning
Stars: ✭ 229 (-2.97%)
Mutual labels:  flask
Titan
Create Discord server widgets for websites of all sizes! A simple to setup process for end-users. Server members may view or send messages into an embedded Discord channel.
Stars: ✭ 221 (-6.36%)
Mutual labels:  flask
Slapdash
Boilerplate for bootstrapping scalable multi-page Dash applications
Stars: ✭ 225 (-4.66%)
Mutual labels:  flask
Flask Base
A simple Flask boilerplate app with SQLAlchemy, Redis, User Authentication, and more.
Stars: ✭ 2,680 (+1035.59%)
Mutual labels:  flask
The Flask Mega Tutorial
📖《The Flask Mega-Tutorial》中文2018最新版📗
Stars: ✭ 221 (-6.36%)
Mutual labels:  flask
Ok
ok.py supports programming projects by running tests, tracking progress, and assisting in debugging.
Stars: ✭ 229 (-2.97%)
Mutual labels:  flask
Eve Sqlalchemy
SQLAlchemy data layer for Eve-powered RESTful APIs
Stars: ✭ 215 (-8.9%)
Mutual labels:  flask
Flask Restplus
Fully featured framework for fast, easy and documented API development with Flask
Stars: ✭ 2,585 (+995.34%)
Mutual labels:  flask
Machine Learning
Web-interface + rest API for classification and regression (https://jeff1evesque.github.io/machine-learning.docs)
Stars: ✭ 235 (-0.42%)
Mutual labels:  flask
Moa
A Mastodon, Twitter, and Instagram Cross-poster
Stars: ✭ 232 (-1.69%)
Mutual labels:  flask
Dash
Analytical Web Apps for Python, R, Julia, and Jupyter. No JavaScript Required.
Stars: ✭ 15,592 (+6506.78%)
Mutual labels:  flask

Running Flask on Kubernetes

Want to learn how to build this?

Check out the post.

Want to use this project?

Docker

Build the images and spin up the containers:

$ docker-compose up -d --build

Run the migrations and seed the database:

$ docker-compose exec server python manage.py recreate_db
$ docker-compose exec server python manage.py seed_db

Test it out at:

  1. http://localhost:8080/
  2. http://localhost:5001/books/ping
  3. http://localhost:5001/books

Kubernetes

Minikube

Install and run Minikube:

  1. Install a Hypervisor (like VirtualBox or HyperKit) to manage virtual machines
  2. Install and Set Up kubectl to deploy and manage apps on Kubernetes
  3. Install Minikube

Start the cluster:

$ minikube start --vm-driver=virtualbox
$ minikube dashboard

Volume

Create the volume:

$ kubectl apply -f ./kubernetes/persistent-volume.yml

Create the volume claim:

$ kubectl apply -f ./kubernetes/persistent-volume-claim.yml

Secrets

Create the secret object:

$ kubectl apply -f ./kubernetes/secret.yml

Postgres

Create deployment:

$ kubectl create -f ./kubernetes/postgres-deployment.yml

Create the service:

$ kubectl create -f ./kubernetes/postgres-service.yml

Create the database:

$ kubectl get pods
$ kubectl exec postgres-<POD_IDENTIFIER> --stdin --tty -- createdb -U postgres books

Flask

Build and push the image to Docker Hub:

$ docker build -t mjhea0/flask-kubernetes ./services/server
$ docker push mjhea0/flask-kubernetes

Make sure to replace mjhea0 with your Docker Hub namespace in the above commands as well as in kubernetes/flask-deployment.yml

Create the deployment:

$ kubectl create -f ./kubernetes/flask-deployment.yml

Create the service:

$ kubectl create -f ./kubernetes/flask-service.yml

Apply the migrations and seed the database:

$ kubectl get pods
$ kubectl exec flask-<POD_IDENTIFIER> --stdin --tty -- python manage.py recreate_db
$ kubectl exec flask-<POD_IDENTIFIER> --stdin --tty -- python manage.py seed_db

Ingress

Enable and apply:

$ minikube addons enable ingress
$ kubectl apply -f ./kubernetes/minikube-ingress.yml

Add entry to /etc/hosts file:

<MINIKUBE_IP> hello.world

Try it out:

  1. http://hello.world/books/ping
  2. http://hello.world/books

Vue

Build and push the image to Docker Hub:

$ docker build -t mjhea0/vue-kubernetes ./services/client \
    -f ./services/client/Dockerfile-minikube

$ docker push mjhea0/vue-kubernetes

Again, replace mjhea0 with your Docker Hub namespace in the above commands as well as in kubernetes/vue-deployment.yml

Create the deployment:

$ kubectl create -f ./kubernetes/vue-deployment.yml

Create the service:

$ kubectl create -f ./kubernetes/vue-service.yml

Try it out at http://hello.world/.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].