Service | Docker Image | Build Status |
---|---|---|
API | subfuzion/vote-api | |
Worker | subfuzion/vote-worker | |
Auditor | subfuzion/vote-auditor | |
Database | Mongo | |
Queue | Redis |
Node.js Packages | npm | Build Status |
---|---|---|
@subfuzion/database | ||
@subfuzion/queue |
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
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 and Helm chart support has been added to the repo. Instructions coming soon.
Deploy to AWS ECS with Fargate
This app is based on the original Docker Example Voting App.
For more information, please see the wiki.
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.
The Voting App is open source and free for any use in compliance with the terms of the MIT License.