/fastapi

learning the main concepts of FastAPI and how to use it to quickly create web APIs that implement best practices by default.

Primary LanguagePython

fastAPI

Learning the main concepts of FastAPI and how to use it to quickly create web APIs that implement best practices by default.

FastAPI is the framework you’ll use to build your API, and Uvicorn is the server that will use the API you build to serve requests.

Running the app (locally)

$ uvicorn main:app --reload

The -reload command means that when you update your application code, the server will reload automatically.

Running the app (Docker)

$ docker run -p 8000:8000 fast-api:v1 
image

Running the app (Kubernetes Cluster)

  • Set up an Ingress controller in Docker Desktop environment on a Mac
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/cloud/deploy.yaml
$ kubectl apply -f ingress.yaml
  • Apply configurations to run in local environment (I am using Docker Desktop on my Mac)
$ kubectl apply -f k8s-config-initial
image

ArgoCD Deployment

  • Install ArgoCD
  • Reference this repo, to view the deployment.