This is a small API written in python
- Python 3.6 +
- Sanic
- Kafka-python
- Pymongo
- Manage.py
- Make sure you have [MongoDB] running.
- Build docker image :
docker build -t my_app .
- Run with the correct environment variables passed in:
docker run -p 8080:8080 -e "DB_NAME=testdb" my_app
run tests with pytest
- install minikube
- Install istio [https://istio.io/docs/setup/getting-started/]
- launch mongo db with
kubectl apply -f mogodb.yaml
- launch app with
kubectl apply -f linguaapi.yaml
- launch istio gateway
kubectl apply -f gateway.yaml
- launch istio virtual service
kubectl apply -f gateway_service.yaml
- access the service with
$(minikube ip)
After changing code, run the following: docker build -t gcr.io/groundtruthbackend/backend . docker push gcr.io/groundtruthbackend/backend