Sifa171 / voting-app

Example Docker Compose app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenShift Voting App

A simple distributed application running across multiple Pods.

Getting started

Make sure you have an OpenShift cluster running

Deploy the app in OpenShift

First create the vote namespace

$ oc new-project vote

Run the following command to create the deployments and services objects:

$ oc create -f vote-app.yml
deployment "db" created
service "db" created
deployment "redis" created
service "redis" created
deployment "result" created
service "result" created
deployment "vote" created
service "vote" created
deployment "worker" created

Architecture

Architecture diagram

  • A front-end web app in Python which lets you vote between two options
  • A Redis queue which collects new votes
  • A Java or .NET Core 2.1 worker which consumes votes and stores them in…
  • A Postgres database backed by a Persistent volume
  • A Node.js webapp which shows the results of the voting in real time

Note

The voting application only accepts one vote per client. It does not register votes if a vote has already been submitted from a client.

About

Example Docker Compose app


Languages

Language:HTML 25.3%Language:JavaScript 19.1%Language:CSS 18.5%Language:Java 14.7%Language:Python 12.6%Language:Dockerfile 7.6%Language:Shell 2.2%