Digital replacement for the drinks tally list featuring a touchscreen, user management and a barcode scanner. https://wiki.flipdot.org/Getr%C3%A4nkez%C3%A4hler
Find a file
2025-12-08 09:58:16 +00:00
.github chore(deps): update actions/checkout action to v6 (#332) 2025-12-06 08:44:04 +01:00
.husky refactor(commitlint): migrate to v19 2024-02-29 01:52:27 +01:00
.idea Screen for recharge party 2025-09-16 23:46:10 +02:00
docker ci(pre-commit): remove checkout limitation (#219) 2024-09-30 01:03:40 +02:00
docs Stop using recharge event. (#310) 2025-09-02 22:52:00 +02:00
drinks_touch chore(deps): update all non-major dependencies, except python 2025-12-05 14:12:36 +00:00
keycloak/realms Add "sync from keycloak" task 2025-03-09 23:58:54 +01:00
x Add X Config Files 2020-02-14 05:01:12 +01:00
.commitlintrc.js refactor(commitlint): migrate to v19 2024-02-29 01:52:27 +01:00
.dockerignore chore(deps): update dependency webpack-cli to v6 (#260) 2025-01-12 09:34:46 +01:00
.env.example Hbox and buttons (#239) 2024-10-20 02:37:37 +02:00
.gitignore Manage drinks web (#323) 2025-10-01 00:56:21 +02:00
.imgbotconfig [ImgBot] Optimize images (#279) 2025-02-20 20:12:07 +01:00
.npmrc chore(deps): update node.js to v22 (#268) 2025-01-12 10:04:36 +01:00
.nvmrc chore(deps): update node.js to v24 (#326) 2025-11-10 02:27:10 +01:00
.pre-commit-config.yaml chore(deps): update dependency python to v3.14.0 (#331) 2025-11-12 23:58:38 +01:00
.releaserc chore: tidy up configuration files 2023-01-04 23:22:03 +01:00
.renovaterc ci(renovate): separate python non-major group 2025-11-10 03:34:49 +01:00
CHANGELOG.md chore(release): 0.5.11 [skip ci] 2025-08-14 01:51:30 +00:00
compose.dev.yaml chore(deps): update all non-major dependencies, except python 2025-11-14 05:02:09 +00:00
compose.prod.yaml chore(deps): update all non-major dependencies, except python 2025-11-14 05:02:09 +00:00
deploy.sh Fix deploy script 2024-02-13 21:31:46 +01:00
Dockerfile chore(deps): update python docker tag to v3.14.1 2025-12-03 06:33:10 +00:00
LICENSE Add A License (GNU GPLv3) 2020-01-14 22:20:00 +01:00
package.json chore(deps): update all non-major dependencies, except python 2025-12-05 14:12:36 +00:00
pnpm-lock.yaml chore(deps): lock file maintenance 2025-12-08 06:08:36 +00:00
pnpm-workspace.yaml refactor(pnpm): use workspace 2023-04-24 16:03:49 +02:00
poetry.lock chore(deps): update dependency pystrich to v0.10 2025-12-08 09:58:16 +00:00
pyproject.toml chore(deps): update all non-major dependencies, except python 2025-12-08 02:12:54 +00:00
README.md No autobegin (#297) 2025-07-08 20:34:47 +02:00
requirements.txt Remove ALL the ldap! (#289) 2025-06-04 23:34:07 +02:00
runGame.sh theorethically allow running runGame.sh again 2024-02-13 19:56:15 +00:00
setup.cfg Loading screen (#231) 2024-10-19 19:27:46 +02:00
setup_all_docker.sh add xinput fix 2024-02-13 22:36:37 +01:00

CI

Drinks Touch

Digital replacement for the drinks tally list featuring a touchscreen, user management and a barcode scanner.

Table of Contents

  1. Development
  2. Profiling
  3. License

Development

Start dependencies like Postgre and keycloak with:

docker compose -f docker-compose.dev.yml up

The project is using poetry. Install the dependencies with:

poetry install

Initialize the database. Needs to be run again after the data model has changed:

alembic upgrade head

To start the application, run:

FULLSCREEN=0 poetry run python drinks_touch/game.py

There are more environment variables available. Checkout the drinks_touch/config.py file for more information.


Python pre-commit helps to detect and fix common issues before committing. Install the git hooks with:

pre-commit install

It is also being run in the CI pipeline. If you see any rules that don't make sense for us, feel free to adjust the .pre-commit-config.yaml file or comment out invocation in the ci.yml file.

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.

Changing the database model

If you do changes to the database, you need to create a migration:

alembic revision --autogenerate

Check the migration file. It is located in alembic/versions/. If everything is fine, apply the migration like described above.

Configuration

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

Deployment

Dependencies

  • Keycloak server, (see oidc.py)
  • PostgreSQL @localhost (see storage.py)
  • touch display with a minimum of 480x800 px.

Install dependencies like this:

sudo apt-get install python-dev libssl-dev
pip2 install -r requirements.txt

Then, start PostgreSQL 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.

Profiling

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