Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uffizzicloud/example-voting-app

Example Docker Compose app
https://github.com/uffizzicloud/example-voting-app

Last synced: 13 days ago
JSON representation

Example Docker Compose app

Awesome Lists containing this project

README

        

Example Voting App
=========

A simple distributed application running across multiple Docker containers.

This example was originally at https://github.com/dockersamples/example-voting-app

It has been modified to demonstrate Continuous Previews on [Uffizzi](https://github.com/UffizziCloud/uffizzi_app).

Getting started
---------------

## Uffizzi

We recommend using the reusable workflow from the Uffizzi `preview-action.`

## Linux Containers

The Linux stack uses Python, Node.js, .NET Core (or optionally Java), with Redis for messaging and Postgres for storage.

Architecture
-----

![Architecture diagram](architecture.png)

* A front-end web app in [Python](/vote) or [ASP.NET Core](/vote/dotnet) which lets you vote between two options
* A [Redis](https://hub.docker.com/_/redis/) or [NATS](https://hub.docker.com/_/nats/) queue which collects new votes
* A [.NET Core](/worker/src/Worker), [Java](/worker/src/main) or [.NET Core 2.1](/worker/dotnet) worker which consumes votes and stores them in…
* A [Postgres](https://hub.docker.com/_/postgres/) or [TiDB](https://hub.docker.com/r/dockersamples/tidb/tags/) database backed by a Docker volume
* A [Node.js](/result) or [ASP.NET Core SignalR](/result/dotnet) webapp which shows the results of the voting in real time

Notes
-----

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

This isn't an example of a properly architected perfectly designed distributed app... it's just a simple
example of the various types of pieces and languages you might see (queues, persistent data, etc), and how to
deal with them in Docker at a basic level.