This is a repository dedicated to my microservice architecture with kafka and postgreSQL.
$ yarn install
$ cd docker/
$ docker-compose -f docker-compose-1.yml up -d
# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
$ cd user-engine && docker build -f ./Dockerfile . -t user-engine
$ cd authentication-engine && docker build -f ./Dockerfile . -t authentication-engine
$ cd encryption-engine && docker build -f ./Dockerfile . -t encryption-engine
$ cd product-engine && docker build -f ./Dockerfile . -t product-engine
$ cd app && docker build -f ./Dockerfile . -t app
$ cd docker/
$ kubectl apply -f postgres-config-map.yaml,postgres-storage.yaml,zookeeper-stack.yaml
$ kubectl apply -f postgres-stack.yaml,kafka-cluster-stack.yaml
$ kubectl apply -f postgres-job.yaml
$ kubectl apply -f app-stack.yaml,authentication-stack.yaml,encryption-stack.yaml,user-stack.yaml
# Applying kubernetes dashboard
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.3.1/aio/deploy/recommended.yaml
# Creating a secure channel to our Kubernetes cluster
$ kubectl proxy
# Creating admin user for login purpose
$ kubectl apply -f dashboard-stack.yaml
# Generating token for login purpose
$ kubectl -n kubernetes-dashboard get secret $(kubectl -n kubernetes-dashboard get sa/admin-user -o jsonpath="{.secrets[0].name}") -o go-template="{{.data.token | base64decode}}"
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/