Files
magikarp-collection/docker-compose.yml
Foohoo 1612834577 Switch card data source from pokemontcg.io to TCGdex
The Pokémon TCG API is deprecated (no new keys, existing keys end 2027-03-01)
and was returning 5xx errors. TCGdex is free and needs no API key.

- src/lib/api.ts: fetch the card list, then each card and set, with retries
  and limited concurrency; map to the existing TcgCard shape. Pokémon TCG
  Pocket cards are skipped.
- Keep the old card IDs for the 10 cards whose TCGdex ID differs, so saved
  checklists stay valid (verified by name, set and number).
- Fall back to the old image host for cards TCGdex has no scan for, and to a
  placeholder if an image fails to load.
- route.ts: serve the last cached data (marked stale) when a refresh fails;
  drop the API key handling.
- Remove the API key variables from compose and the env example; update README.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 13:14:25 +00:00

26 lines
692 B
YAML

version: "3.9"
services:
app:
build:
context: .
dockerfile: Dockerfile
image: magikarp-collection:latest
environment:
- NODE_ENV=production
# Internal Next.js port (container). Do not change unless you change Dockerfile.
- PORT=3000
# Optional: enable very simple single-user Basic Auth
- BASIC_AUTH_USER=${BASIC_AUTH_USER}
- BASIC_AUTH_PASS=${BASIC_AUTH_PASS}
ports:
# Select host port via APP_PORT env var; default 3000
- "127.0.0.1:${APP_PORT:-3000}:3000"
volumes:
# Persist cache JSON files using a named volume
- magikarp-data:/app/data
restart: unless-stopped
volumes:
magikarp-data: