Skip to content

PierreBeucher/example-voting-app

 
 

Repository files navigation

Example Voting App

Example Voting App adapted for Crafteo Training

Running the stack

Initialize Docker Swarm

You have two hosts at your disposal: host1 and host2 with Docker installed. We'll create a Docker Swarm with 2 nodes.

Commands to run on host1:

# ssh into host1:
#
#   ssh ubuntu@ssh [email protected]
#
# Init Docker swarm from host1
# Keep outputed token!
docker swarm init

Commands to run on host2:

# ssh into host1:
#
#   ssh ubuntu@ssh [email protected]
#
docker swarm join [TOKEN]

Run the stack

# ssh into host1:
#
#   ssh ubuntu@ssh [email protected]
#

# Clone Voting App repo
git clone https://github.com/PierreBeucher/example-voting-app.git
cd example-voting-app

# Run the stack
docker stack up voting-app -c docker-stack.yml

App should be accessible (make sure to replace host1 by your actual hostname):

About

Example Docker Compose app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 22.6%
  • JavaScript 21.4%
  • CSS 14.8%
  • HTML 13.1%
  • Shell 12.1%
  • Dockerfile 8.5%
  • Other 7.5%