Digital replacement for the drinks tally list featuring a touchscreen, user management and a barcode scanner.
docker compose -f docker-compose.dev.yml up
- Reading mails via mailpit: http://localhost:8025/
This project is deployed within the drinks-touch_stack in accordance to the DargStack template to make deployment a breeze.
The provided Dockerfile
lets you build a localized Python image. Build it with the following command:
docker build -t flipdot/drinks-touch .
The following information is therefore only useful if you decide to deploy this project containerless.
This project does not require any build procedure.
The following configuration files are evaluated at execution time and must be derived from their respective examples, which can be found in the same directories.
drinks_touch/config.py
- LDAP server, reachable via
ldap://rail/
(see users.py) - PostgreSQL @localhost (see storage.py)
- touch display with a minimum of 480x800 px.
Install dependencies like this:
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
pip2 install -r requirements.txt
Then, start PostgreSQL and OpenLDAP with systemctl start
. And finally, run the entrypoint script drinks_touch/game.py
.
For embedded systems it is recommended to use @reboot runGame.sh
inside a cron tab.
This starts an X server, sets various display properties and puts the application itself in a loop.
To profile the time individual lines of code take to execute install line_profiler.
pip install line_profiler
Then add @profile to the methods you are interested in.
Inside drinks_touch
, run with
kernprof -l game.py
And analyze results with
python -m line_profiler game.py.lprof | less