A simple webapp to pull a "random" name from hat. e.g: for selecting meeting facilitators.
339
A simple webserver that allows you to drag names out of hat. Has a full UI which you can manage users, restart the hat, and so on.
This example is mounting a "data" dir from the host. Leave out the volume mount if you dont need the persistence.
docker run -v `pwd`/data:/app/data -p 8000:8000 unixunion/digitalhat:latest
The database is just simple python pickled objects, other persistence engines might come in future.
If you shell into the container, you can explore the options on the python server
docker run -p 8000:8000 --entrypoint /bin/sh -ti digitalhat:latest
/app # python hat-server.py --help
Adds a new facilitator to the database
curl -i -H "Content-Type: application/json" -X POST -d '{"name": "Testy Test"}' http://HOST:PORT/add
Remove facilitator from the db, and the hat
curl -i -H "Content-Type: application/json" -X POST -d '{"name": "Testy Test"}' http://HOST:PORT/remove
Selects and returns the next facilitator
curl http://HOST:PORT/next
Shows the current ( previously selected ) facilitator
curl http://HOST:PORT/current
Puts the current facilitator back in the hat, used for cases where a facilitator needs to be returned to the pile.
curl http://HOST:PORT/revert
Removes a name from the hat
curl -i -H "Content-Type: application/json" -X POST -d '{"name": "Testy Test"}' http://HOST:PORT/tweak/hat/remove
Add a name to the hat
curl -i -H "Content-Type: application/json" -X POST -d '{"name": "Testy Test"}' http://HOST:PORT/tweak/hat/add
Select a name in the hat specifically.
curl -i -H "Content-Type: application/json" -X POST -d '{"name": "Testy Test"}' http://HOST:PORT/tweak/hat/select
Content type
Image
Digest
Size
22.7 MB
Last updated
almost 5 years ago
docker pull unixunion/digitalhat