xbfighting / quiz

Example real time quiz application with .NET Core, DDD, Event Sourcing and Docker and built-in CI/CD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quiz App

Simple EventSourcing example using .NET Core, React, Docker, Jenkins and K8s.

  • run with docker from bash with .\run.sh

    Open http://localhost for quiz voting

    Open http://localhost?results for quiz results

  • run with minikube

    • Create secrets for jenkins, database, docker registry and messagebroker .
    DB_PASS=changeit \
    DB_USER=admin \
    DB_CONNECTION="Username=admin;Password=changeit;Host=db;Port=5432" \
    REGISTRY_PASS=registrypass \
    REGISTRY_USER=registryuser \
    GITHUB_TOKEN=1111111111111111111111 \
    JENKINS_PASS=changeit \
    JENKINS_USER=admin \
    MESSAGE_BROKER="amqp://guest:guest@messagebroker:5672" \
    ./secrets.sh
    • Build, push and deploy jenkins to k8s cluster
    eval $(minikube docker-env) && \
    REGISTRY=myregistry \
    REGISTRY_PASS=$(cat secrets/registry-pass) \
    REGISTRY_USER=$(cat secrets/registry-user) \
    TAG=latest \
    JENKINS_URL=jenkins-url.com \
    GITHUB_REPO=netcorebcn\/quiz \
    GITHUB_ADMINS=mygithubuser \
    ./build-jenkins.sh
    • Add ingress hosts to local host file
    echo $(minikube ip) quiz{,-ci,-rabbit}.io | sudo tee -a /etc/hosts

Notes: We aren't starting from the scratch. We are using ideas and code from other awesome repos.

About

Example real time quiz application with .NET Core, DDD, Event Sourcing and Docker and built-in CI/CD


Languages

Language:C# 57.7%Language:JavaScript 24.8%Language:CSS 6.5%Language:Groovy 5.7%Language:Shell 3.5%Language:HTML 1.8%