Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
/ rpi-voting-app Public archive

A dockerized voting application demo, adapted for Raspberry PI

Notifications You must be signed in to change notification settings

jmMeessen/rpi-voting-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

Example Voting App (For Raspbery PI)

This is an example Docker app with multiple services, adapted for ARM processors using the Hypriot OS. It is run with Docker Compose and uses Docker Networking to connect containers together.

It is based on https://github.com/docker/example-voting-app

More info at https://blog.docker.com/2015/11/docker-toolbox-compose/

Architecture

  • A Python webapp which lets you vote between two options
  • A Redis queue which collects new votes
  • A Java worker which consumes votes and stores them in…
  • A Postgres database backed by a Docker volume
  • A Node.js webapp which shows the results of the voting in real time

Running

As of docker-compose v1.6 --x-networking flag is no longer necessary:

$ cd vote-apps/worker
$ make build # Will pre-build the java application for the worker and copy it locally
$ cd ..
$ docker-compose up -d # Include --x-networking if using docker-compose version < 1.6

The app will be running on port 5000 on your Docker host, and the results will be on port 5001.

NOTE: If running on a single RPi instead of a swarm you might encounter ERROR: failed to parse pool request for address space "GlobalDefault" pool "" subpool "": cannot find address space GlobalDefault (most likely the backing datastore is not configured). This is because you cannot create an overlay network on a single node. Comment out line 50 & 52 in docker-compose.yml that specify the network driver as overlay.

Docker Hub images

Docker Hub images for services in this app are built automatically from master:

About

A dockerized voting application demo, adapted for Raspberry PI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published