• Stars
    star
    122
  • Rank 292,031 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example containerized microservices Voting App based on the original Docker version. bit.ly/voting-app-with-docker

Voting App with Docker (Node.js version)

Quick Start

Install Docker. 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.

In the project's root directory, run:

$ 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: 0, dogs: 1 ... DOGS 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

About the Voting App

Voting app architecture

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

For an orientation, see this presentation.

License

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

More Repositories

1

express-demo

Dead simple lessons starting from ground zero to get familiar with Express
JavaScript
135
star
2

droidex

DroidEx Android projector
Java
96
star
3

envtpl

Render Go templates on the command line with shell environment variables
Go
76
star
4

dart-docker-slim

Create slim Docker images for Dart using subfuzion/dart:slim as the base
Shell
76
star
5

dart-flutter-fullstack-demo

C++
43
star
6

demo-node-mongo-docker-compose

JavaScript
18
star
7

demo-iojs-es6

Demonstrate io.js Ecmascript 6 language features in the form of mocha tests
JavaScript
14
star
8

cloud-run-for-anthos-labs

Learn about the serverless experience for your enterprise applications with Cloud Run for Anthos
Shell
14
star
9

enable-appmesh

Enable App Mesh for ECS/Fargate apps with the AWS Console
TypeScript
12
star
10

docker-netcat

Simple Alpine image for running netcat (nc)
11
star
11

istio-test-drive

Istio test drive
Shell
11
star
12

snapfinder-api

snapfinder-api is a REST API for locating retailers that participate in the SNAP (formerly known as Food Stamps) program.
JavaScript
10
star
13

voting-demo

Simple voting app demo
JavaScript
9
star
14

docker-namesgenerator

Port of Docker 0.7.x names generator written in go to node. Just for fun.
JavaScript
8
star
15

dotlog

Simple logging library for .NET
C#
8
star
16

cracking-the-coding-interview-in-go

Cracking the Coding Interview using Go tests
Go
8
star
17

node-demo

Simple beginner demo for meetup
JavaScript
8
star
18

snapfinder

SNAPfinder is a mobile-first app for locating retailers that participate in the SNAP (formerly known as Food Stamps) program.
JavaScript
7
star
19

cloudpong

Cloud Pong: serverless bi-di websocket streaming and distributed state with Redis
TypeScript
6
star
20

create-typescript-app

Create a Node.js app configured for TypeScript.
Shell
6
star
21

book-docker-for-developers

Book for the Software Containerization with Docker for Developers course
6
star
22

expressapi

Starter Express API service app
JavaScript
5
star
23

run

A lightweight utility for Node.js developers that simplifies creating, deploying, and monitoring serverless apps on Google Cloud.
TypeScript
5
star
24

snapfinder-lib

snapfinder-lib is a node library for locating retailers that participate in the SNAP (formerly known as Food Stamps) program.
JavaScript
5
star
25

challenge-ios

Objective-C
4
star
26

appmesh-blog

Draft content for App Mesh guide and blog posts
Shell
4
star
27

duet-ai-express-app

Create an Express app and deploy with Duet AI prompts
JavaScript
4
star
28

logster

Simple but powerful logger for Node. Includes console, stream, and Mongo loggers.
JavaScript
4
star
29

fargate-chat

JavaScript
3
star
30

challenge-api

JavaScript
3
star
31

subfuzion.github.io

The personal blog of Tony Pujals
HTML
3
star
32

nodehackers

Node Hackers at Hacker Dojo Meetup Group - Presentations and Code Samples
3
star
33

echo

A web app for sending messages over WebSockets using echo.io
JavaScript
3
star
34

containers-for-developers

2
star
35

algorithms-in-javascript

Algorithm solutions in JavaScript
JavaScript
2
star
36

ax

Actor Extensions Framework for .NET
C#
2
star
37

simple-expressapi

A very simple starter app for a service API
JavaScript
2
star
38

appmesh.dev

Orientation guide with examples for using App Mesh to control and monitor your microservice applications on AWS.
TypeScript
2
star
39

traffic-director-labs

Learn how to use Traffic Director service mesh for your applications on Google Cloud
Shell
2
star
40

java-server-demos

Java
1
star
41

ezfinder

API to help citizens find free and low-cost health clinics, Section 8 housing, and stores that accept SNAP (food stamp) cards.
JavaScript
1
star
42

demo-json-schema

Simple demo of JSON Schema creation and validation
JavaScript
1
star
43

docker-dind

Convenience image based on latest Docker in Docker
1
star
44

demo-debugging

Introduction to common Node debugging strategies
JavaScript
1
star
45

njx

Nunjucks Utility
JavaScript
1
star
46

stack

Experimental attempt to create an importable package for Docker stack operations
Go
1
star
47

node-redis-queue

Simple queue based on Redis for Docker Demo
JavaScript
1
star
48

echo.io

An echo server for Node based on websockets
JavaScript
1
star
49

demo-nodejs-cloud-client

Demo Node/Express/Angular app using the Node.js Cloud Client library to access a Google Cloud API.
TypeScript
1
star
50

node-mongodb-voting

Simple voting database based on MongoDB for Docker Demo
JavaScript
1
star
51

file-server-demo

Demonstrate uploading and downloading files to an Express server
JavaScript
1
star
52

election-app

JavaScript
1
star
53

docker-swarm-bootstrap

Create a local swarm using Docker in Docker
Shell
1
star
54

dgo

Go development environment in Docker with bells and whistles
Shell
1
star
55

gsDesign

Generates group sequential designs using alpha- and beta-spending functions or Wang-Tsiatis (e.g., O'Brien-Fleming and Pocock) boundary families. Many plotting capabilities as well as non-binding futility rules are available. Easily extended.
JavaScript
1
star
56

cloud-run-hello-app-demo

Getting started with the Google Cloud CLI interactive shell for serverless developers
JavaScript
1
star
57

denobyexample.dev

Deno by example.
HTML
1
star
58

unlock

TypeScript
1
star
59

typescript-on-gcp

Handbook for Full Stack Developers
TypeScript
1
star