/zencastr

Primary LanguagePython

Zencastr API

Quickstart

$ git clone git@github.com:taxtgg/zencastr.git
$ pipenv install 
$ pipenv shell
$ pipenv install -e .

To configure git run:

$ pipenv run dev-init

To start local environment run:

$ pipenv run dev-start
$ uvicorn main:app --reload

Stop local dev environment by using CTRL-C and:

$ pipenv run dev-stop

Run tests:

$ pipenv run test

Deploy to k8s (see minikube setup here):

$ kubectl config use-context minikube
$ kubectl apply -f k8s/db.yaml
$ kubectl apply -f k8s/app.yaml

Access the app:

kubectl port-forward svc/zencastr 8080:80

The Swagger is on URL /docs. Enjoy!

Improvements

The list of possible improvements includes:

  • Secure Mongo (Good tutorial here)
  • Unify scripts in Click based cli
  • Add better health check endpoint (for example using this)
  • Add better DB connection testing
  • Add Prometheus metrics exporter (using this or this)