Sign inSign up

janvda/niamondo-deck2

By janvda

•Updated 3 days ago

Image
0

269

janvda/niamondo-deck2 repository overview

⁠niamondo-deck2

Multi-user, multi-session card deck for the board game niamondo. It is an independent app next to the Node-RED deck; the only thing they share is the master database niamondo.db.

Status: feature complete, not yet released (image 0.1.0 is not pushed to Docker Hub yet). See SPEC.md⁠.

What it does:

  • Hosts (accounts by invite code) create game sessions; players join with a 6-character code and a name, no account.
  • Any number of sessions run side by side. Everyone in a session sees the same card on every device, updated live (server-sent events, no polling).
  • Cards: all five types with the old colours, country and state tables, source, world production, "per person" text, missions, and the video (per-device on/off).
  • Dutch UI, short manual at /docs/.
  • Plain JavaScript only (static/live.js), strict CSP, no CDN.

⁠Run locally

brew install go          # once
cd deck2
cp env.sample .env.local # fill in DECK2_ADMIN_EMAIL, DECK2_ADMIN_PASSWORD, DECK2_LISTEN, …
make test
make run                 # starts the server at the address in .env.local
make open                # opens the browser at that address (macOS)

⁠Configuration (environment variables)

VariableDefaultMeaning
DECK2_LISTEN127.0.0.1:8080 (image: 0.0.0.0:8080)address to bind
DECK2_DATA_DIR./data (image: /data/sessions)directory for sessions.db (local volume, not backed up)
DECK2_MASTER_DB./niamondo.db (image: /app/niamondo.db)read-only master data
DECK2_ADMIN_EMAIL, DECK2_ADMIN_PASSWORD–admin bootstrap (see env.sample)
DECK2_PUBLIC_URL–public base URL
DECK2_TRUST_PROXYfalsehonour X-Forwarded-For / X-Forwarded-Proto (set true only when the container is reachable solely through the reverse proxy)
DECK2_INSECURE_COOKIESfalsedrop the Secure cookie flag so the app works over plain http. Development only; a warning is logged
DECK2_MAX_SSE300maximum concurrent live-update connections

⁠Container

The image is a static Go binary on ubi9/ubi-micro, running as uid 1001. Run it with read_only: true, cap_drop: [ALL], no-new-privileges and a writable volume on /data/sessions. The container serves plain HTTP; TLS must be terminated by the reverse proxy.

⁠Release

  1. make test vuln
  2. bump SERVICE_VERSION in Makefile and the image: tag in docker-compose.nuc2-lan.yml
  3. make all (docker context colima, Docker Hub login)

Tag summary

Content type

Image

Digest

sha256:0d66f2c1c…

Size

11.8 MB

Last updated

3 days ago

docker pull janvda/niamondo-deck2