2c2f07c2ec
Frontend: - Dark green/gold "velvet table" visual redesign across the whole app (Auth, Lobby, GameList, GameTable, History, GameOver, modals), with Playfair Display/DM Sans typography and a centralized Tailwind palette. - Desktop game table fit-scales to fill the window; mobile gets overlapping hand/trick layouts and larger touch-friendly cards. - Standings sidebar now groups completed rounds by series with a per-series subtotal row, struck-through tips on missed bids. - History page rewritten into a scoreboard-style detail view (player totals beside names, series grouped 2-up on desktop / stacked on mobile) and gained game names, completed/abandoned status, and a button to reopen a prematurely-ended game back into the lobby. Backend: - Fix started games being deleted from memory (and vanishing from everyone's lobby) when all players disconnect; only `end_game` tears down a started game now. - Fix a crash writing a timezone-aware datetime into the naive `ended_at` Postgres column. - Add `reopen_game`/`restore_game` to un-end a prematurely-ended game from history and resume it from the lobby. - Let any seated player end an abandoned game once the host is offline, not just the host, so the game isn't stuck forever. - Expose SERIES_PER_GAME/ROUNDS_PER_SERIES as named constants on the engine so the persistence layer derives game-completion rules from bridzik.py instead of re-encoding them. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
services:
|
|
db:
|
|
image: postgres:18-alpine
|
|
environment:
|
|
POSTGRES_USER: bridzik
|
|
POSTGRES_PASSWORD: bridzik
|
|
POSTGRES_DB: bridzik
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U bridzik -d bridzik"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
build: .
|
|
environment:
|
|
# Async SQLAlchemy URL -> the Postgres service above (asyncpg driver).
|
|
DATABASE_URL: postgresql+asyncpg://bridzik:bridzik@db:5432/bridzik
|
|
ports:
|
|
- "5000:5000"
|
|
volumes:
|
|
- ./:/app
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
frontend:
|
|
image: node:22-alpine
|
|
working_dir: /app
|
|
environment:
|
|
# Inside the compose network the backend is reachable as `backend`.
|
|
VITE_BACKEND_URL: http://backend:5000
|
|
volumes:
|
|
- ./frontend:/app
|
|
ports:
|
|
- "5173:5173"
|
|
command: sh -c "npm install && npm run dev -- --host"
|
|
depends_on:
|
|
- backend
|
|
|
|
volumes:
|
|
pgdata:
|