Initial build: fullhouse, live music bingo from a real Spotify playlist
Based on bingo-bango by f8al (MIT) — same core card-generation idea
("both facets": a square is either an exact song title or an artist,
and an artist square lights up on any of their tracks), reworked with
a real host/guest split, live multiplayer sessions, and cover-art
squares. f8al credited in the footer, README, and PROPOSAL.md.
Three ways to play: host a live session (server-side Spotify
connection, join code + QR, caller screen, auto-call from real
playback), join someone else's session (no login needed), or solo
(guest PKCE login or a pasted public playlist URL, one-off card).
Genuinely verified against a real Spotify account throughout, not
just built and assumed working — including two real bugs found and
fixed along the way (Spotify's playlist-tracks endpoint quietly
renamed to /items with a reshaped response; reading playlist tracks
needs real user auth even for public playlists, so the "no guest
login" public-playlist path routes through the host's connection
instead of a dead-end app-only token). Both Docker images built and
run together on a real network with the nginx proxy verified working
end-to-end, and auto-call confirmed detecting an actual track playing
live through Spotify Connect within one poll tick.
2026-07-18 22:05:37 +02:00
|
|
|
# ── Stage 1: build the Vite client ────────────────────────────────────────
|
|
|
|
|
FROM node:22-alpine AS build
|
|
|
|
|
|
|
|
|
|
WORKDIR /app/client
|
|
|
|
|
COPY client/package.json client/package-lock.json* ./
|
|
|
|
|
RUN npm install
|
|
|
|
|
COPY client/ .
|
|
|
|
|
|
|
|
|
|
# Deliberately empty: relies on nginx same-origin-proxying /api to the
|
|
|
|
|
# api service (see nginx.conf) instead of an absolute cross-origin URL
|
2026-07-18 22:15:13 +02:00
|
|
|
# — the CORS bug that broke local dev earlier in this build. No
|
|
|
|
|
# SPOTIFY_CLIENT_ID build-arg needed — the client fetches it from
|
|
|
|
|
# /api/config at runtime instead (see client/src/lib/pkce.ts); it's not
|
|
|
|
|
# sensitive data, and this keeps it configured in exactly one place
|
|
|
|
|
# (the server's own .env), not a second copy baked in here.
|
Initial build: fullhouse, live music bingo from a real Spotify playlist
Based on bingo-bango by f8al (MIT) — same core card-generation idea
("both facets": a square is either an exact song title or an artist,
and an artist square lights up on any of their tracks), reworked with
a real host/guest split, live multiplayer sessions, and cover-art
squares. f8al credited in the footer, README, and PROPOSAL.md.
Three ways to play: host a live session (server-side Spotify
connection, join code + QR, caller screen, auto-call from real
playback), join someone else's session (no login needed), or solo
(guest PKCE login or a pasted public playlist URL, one-off card).
Genuinely verified against a real Spotify account throughout, not
just built and assumed working — including two real bugs found and
fixed along the way (Spotify's playlist-tracks endpoint quietly
renamed to /items with a reshaped response; reading playlist tracks
needs real user auth even for public playlists, so the "no guest
login" public-playlist path routes through the host's connection
instead of a dead-end app-only token). Both Docker images built and
run together on a real network with the nginx proxy verified working
end-to-end, and auto-call confirmed detecting an actual track playing
live through Spotify Connect within one poll tick.
2026-07-18 22:05:37 +02:00
|
|
|
ENV VITE_API_BASE=
|
|
|
|
|
|
|
|
|
|
RUN npx tsc && npx vite build
|
|
|
|
|
|
|
|
|
|
# ── Stage 2: serve ─────────────────────────────────────────────────────────
|
|
|
|
|
FROM nginx:alpine
|
|
|
|
|
COPY --from=build /app/client/dist /usr/share/nginx/html
|
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
|
EXPOSE 80
|