vinhlee95 / ticket_app

A ticketing app built with microservices and event sourcing architecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tickets app

A small web application running microservices inside k8s cluster.

Installation

Prerequisite

  1. Create a new k8s cluster using docker-desktop context:
kubectl config get-contexts
kubectl config use-context docker-desktop
  1. Get ingress-nginx controller up and running.

Example (the YAML config might change, refer to the installation guide above):

cd k8s
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.1/deploy/static/provider/cloud/deploy.yaml
  1. Install skaffold CLI for easier development
  2. Tweak hosts file in your computer to redirect traffic from ingress host configuration to your localhost: Example in MacOS:
sudo nano /etc/hosts

Then add the mapping and save. In this example, tickets.dev is the host for authentication rule of ingress-service:

127.0.0.1 tickets.dev
  1. Build a Docker image for auth, tickets-client and tickets services (if you want to use your own images)
cd auth
docker build -t your_docker_id/auth .
docker push your_docker_id/auth

Same thing could be done for tickets-client and tickets. Note that the image name, your_docker_id/auth in this case, will be used in e.g. auth-deployment config.

  1. Start the development environment:
skaffold dev

Example output: image

About

A ticketing app built with microservices and event sourcing architecture


Languages

Language:TypeScript 78.6%Language:JavaScript 20.3%Language:Dockerfile 1.1%