pneff / voting-app

Example containerized microservices Voting App based on the original Docker version

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker Voting App (Node.js version)

Build Status

Service Docker Image Build Status
API     subfuzion/vote-api Docker build
Worker subfuzion/vote-worker Docker build
Auditor subfuzion/vote-auditor Docker build
Database Mongo Docker build
Queue Redis Docker build
Node.js Packages npm Build Status
@subfuzion/database npm (scoped) Travis
@subfuzion/queue npm (scoped) Travis

Quick Start

Get Docker for free from the Docker Store. This app will work with versions from either the Stable or the Edge channels.

If you're using Docker for Windows on Windows 10 pro or later, you must also switch to Linux containers.

Run in this directory:

$ docker-compose up

You can test it with the voter CLI:

$ docker run -it --rm --network=host subfuzion/voter vote
? What do you like better? (Use arrow keys)
  (quit)
❯ cats
  dogs

You can print voting results:

$ docker run -it --rm --network=host subfuzion/voter results
Total votes -> cats: 4, dogs: 0 ... CATS WIN!

When you are finished:

Press Ctrl-C to stop the stack, then enter:

$ docker-compose -f docker-compose.yml rm -f

Docker Swarm

You can also run it on a Docker Swarm. If you haven't initialized one yet, run:

$ docker swarm init

Once you have initialized a swarm, then deploy the stack:

$ docker stack deploy --compose-file docker-stack.yml vote

You can test it the same way as described for docker-compose. When finished, you can stop the stack by entering:

$ docker stack rm vote

Kubernetes

Kubernetes and Helm chart support has been added to the repo. Instructions coming soon.

Amazon ECS with Fargate

Deploy to AWS ECS with Fargate

About the Voting App

Voting app architecture

This app is based on the original Docker Example Voting App.

For more information, please see the wiki.

Introduction to Docker Course

The app will be used for an introductory course called Software Containerization with Docker for Developers.

The course will be offered through the UC Davis Extension online program, available on Coursera sometime in the spring of 2018.

See the wiki for more detail about course modules.

License

The Voting App is open source and free for any use in compliance with the terms of the MIT License.

About

Example containerized microservices Voting App based on the original Docker version

License:MIT License


Languages

Language:JavaScript 93.0%Language:Dockerfile 4.5%Language:Smarty 2.1%Language:Shell 0.4%