Single-container FastAPI app to display and administer a tap list (beers) with images. Designed to run on single-board computers or any small host. Single Docker image using SQLite + a mounted volume for persistence. On first start the container creates a sample database automatically (three example beers + default settings) if the DB file does not yet exist. Currently only supports beer, other drinks are planned.
- FastAPI + SQLModel (SQLite file DB)
- Auto-creates DB and seeds sample beers if empty (one‑shot initialization handled by entrypoint)
- Admin UI at
/adminfor:- Creating beers
- Inline edit tap number / name / style
- Upload images (stored in DB as BLOBs)
- Delete beers
- Public display wall at
/optimized for fullscreen TV (dark theme, responsive) - Display title and logo (upload a logo) stored in DB
- Lightweight runtime migration adds new nullable columns and tables if missing
Build the image:
docker build -t opentapwall:latest .
Run the container with persistence:
mkdir -p opentapwall_data
docker run -d \
--name opentapwall \
-p 8000:8000 \
-v $(pwd)/opentapwall_data:/data \
opentapwall:latest
Open:
- Wall: http://localhost:8000/
- Admin: http://localhost:8000/admin
Bind mount the source and override the command:
docker run --rm -it \
-p 8000:8000 \
-v $(pwd):/code \
-v $(pwd)/opentapwall_data:/data \
-e DB_PATH=/data/opentapwall.db \
opentapwall:latest \
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
| Variable | Purpose | Default |
|---|---|---|
DB_PATH |
SQLite database file path | /data/opentapwall.db |
All persistent state lives under /data (mapped to your host opentapwall_data directory). This includes the SQLite database which stores beers, settings, and image BLOBs. Back it up by copying that folder. If you remove the opentapwall.db file, a fresh sample will be generated on the next container start.
GET /beers/list beersPOST /beers/create via JSONPOST /beers/createform-create (used by Admin UI)PATCH /beers/{id}partial updateDELETE /beers/{id}deletePOST /beers/upload-image/{id}attach image file (multipart)PATCH /settingsupdate display titlePOST /settings/logoupload logo imageGET /images/{id}serve stored image by id
On startup a simple check ensures new nullable columns / tables are added if missing (beer image columns, display settings, stored image table).
The Docker image uses an entrypoint script (docker-entrypoint.sh) which:
- Ensures the
/datadirectory exists. - If the database file defined by
DB_PATHdoes not exist, creates tables and seeds three sample beers plus default display settings. - Starts the
uvicornserver.
To force re-seeding, delete the database file inside your mounted volume:
rm opentapwall_data/opentapwall.db
Then restart the container.
This repo contains a workflow at .github/workflows/docker-publish.yml that builds and pushes multi-arch images on pushes to main and on version tags (vX.Y.Z).
## Support me If you might find this app useful, support me on Ko-fi!
