Skip to content

Rat of Fortune Docker Image

docker_container_rat-of-fortune

Rat of Fortune is a small browser-based application that spins a graphical wheel to pick a random name from a list.

It is useful for lightweight demos, team games, random assignment, or any situation where a visual random picker is more fun than a script.

Image

Features

  • Load names from a names.txt file
  • Select which users to include with checkboxes
  • Spin a graphical wheel in the browser
  • Show an animated winner announcement
  • Run behind a reverse proxy using a configurable base path

Docker run

Create a name list:

printf "Alice\nBob\nCharlie\nDiana\n" > names.txt

Start the container:

docker run -p 5000:5000 \
  -v $(pwd)/names.txt:/app/names.txt \
  bsmeding/rat-of-fortune:latest

Open the application at http://localhost:5000/.

Run under a subpath

Set APP_BASE_PATH when the application is published behind a reverse proxy path such as /wheel.

docker run -p 5000:5000 \
  -v $(pwd)/names.txt:/app/names.txt \
  -e APP_BASE_PATH=/wheel \
  bsmeding/rat-of-fortune:latest

Open the application at http://localhost:5000/wheel/.

Build from source

git clone https://github.com/bsmeding/docker_container_rat-of-fortune.git
cd docker_container_rat-of-fortune

printf "Alice\nBob\nCharlie\nDiana\n" > names.txt

docker build -t rat-of-fortune .
docker run -p 5000:5000 \
  -v $(pwd)/names.txt:/app/names.txt \
  rat-of-fortune

Credits

  • Winwheel.js for the wheel logic
  • GSAP TweenMax for animation