Files
cup26/deploy/cup26.compose.yml
NilsBriggen 03b0fa734e Web Push: goal, kickoff and full-time alerts for a followed team
Fully progressive: without VAPID keys in the environment the API says
404, the bell never renders, and the service worker addition (a push
handler via workbox importScripts — no SW strategy change) is inert.
With keys: a bell on each team page requests permission, subscribes
(one team per device) and the server diffs fixture states on every
broadcast to push Kickoff / Goal / Full time to that team's followers.
Dead endpoints (404/410) self-clean. Round-trip verified locally with
dev VAPID keys; disabled mode verified too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:21:55 +02:00

58 lines
2.1 KiB
YAML

# Self-contained compose project for cup26.briggen.dev.
# Deploy: rsync the repo to /root/cup26/, place this file there as
# docker-compose.yml, then `docker compose up -d --build`.
# Joins the EXISTING external `proxy` network — the shared Traefik stack is untouched.
name: cup26
services:
cup26:
build: .
container_name: cup26
restart: unless-stopped
environment:
- PORT=8787
- STATIC_DIR=/app/dist
- NODE_ENV=production
- ALLOWED_ORIGINS=https://cup26.briggen.dev
- DATA_DIR=/data
# football-data.org free API token (https://www.football-data.org/client/register)
- FOOTBALL_DATA_TOKEN=${FOOTBALL_DATA_TOKEN:-}
# opt-in unofficial sources (usually blocked from a datacenter IP; ESPN is primary)
- ENABLE_SOFASCORE=${ENABLE_SOFASCORE:-false}
- ENABLE_FOTMOB=${ENABLE_FOTMOB:-false}
- ARCHIVE_DIR=/data/archive
# Web Push (optional): goal/kickoff alerts. Generate once with
# `npx web-push generate-vapid-keys`; absent keys = feature hidden.
- VAPID_PUBLIC_KEY=${VAPID_PUBLIC_KEY:-}
- VAPID_PRIVATE_KEY=${VAPID_PRIVATE_KEY:-}
- VAPID_SUBJECT=${VAPID_SUBJECT:-}
volumes:
# The LIVE SQLite must stay on a real local filesystem (WAL + locking do
# not survive network mounts). HOST_DATA_DIR can override if ever needed.
- ${HOST_DATA_DIR:-cup26-data}:/data
# Nightly VACUUM INTO snapshots land here — point HOST_ARCHIVE_DIR at the
# 1TB storage box (CIFS is fine for sequential snapshot files).
- ${HOST_ARCHIVE_DIR:-cup26-archive}:/data/archive
security_opt:
- no-new-privileges:true
mem_limit: 384m
memswap_limit: 384m
pids_limit: 200
cpus: 1.0
labels:
- "traefik.enable=true"
- "traefik.http.routers.cup26.rule=Host(`cup26.briggen.dev`)"
- "traefik.http.routers.cup26.entrypoints=websecure"
- "traefik.http.routers.cup26.tls.certresolver=letsencrypt"
- "traefik.http.services.cup26.loadbalancer.server.port=8787"
networks:
- proxy
volumes:
cup26-data:
cup26-archive:
networks:
proxy:
external: true