chore(release): v2.2.2 – seed default config files on startup; preserve defaults in image; bump versions in compose; update changelog

This commit is contained in:
mwisnowski 2025-09-01 17:54:38 -07:00
parent 1988f98c5b
commit a0a12baa9b
7 changed files with 69 additions and 30 deletions

View file

@ -12,6 +12,17 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning
## [Unreleased]
## [2.2.2] - 2025-09-01
### Fixed
- Ensure default config files are available when running with bind-mounted config directories:
- Dockerfile now preserves a copy of defaults at `/.defaults/config` in the image.
- Entrypoint seeds missing files into `/app/config` on container start (`deck.json`, `card_lists/combos.json`, `card_lists/synergies.json`).
- Adds a back-compat symlink `combo.json -> combos.json` if missing.
This resolves cases where a blank host `config/` overlay made files appear missing.
### Changed
- Example compose files updated to use `APP_VERSION=v2.2.2`.
## [2.2.1] - 2025-09-01
### Added
- Combos & Synergies: detect curated two-card combos/synergies and surface them in a chip-style panel with badges (cheap/early, setup) on Step 5 and Finished Decks.

View file

@ -24,11 +24,16 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY code/ ./code/
COPY mypy.ini .
# Copy default configs in two locations:
# 1) /app/config is the live path (may be overlaid by a volume)
# 2) /app/.defaults/config is preserved in the image for first-run seeding when a volume is mounted
COPY config/ ./config/
COPY config/ /.defaults/config/
RUN mkdir -p owned_cards
# Create necessary directories as mount points
RUN mkdir -p deck_files logs csv_files config
RUN mkdir -p deck_files logs csv_files config /.defaults
# Create volumes for persistent data
VOLUME ["/app/deck_files", "/app/logs", "/app/csv_files", "/app/config", "/app/owned_cards"]

View file

@ -33,3 +33,6 @@
- Existing completed pairs are counted toward the target; only missing partners are added.
- No changes to CLI inputs for this feature in this release.
- Headless: `tag_mode` supported from JSON/env and exported in interactive run-config JSON.
## Fixes
- Fixed an issue with the Docker Hub image not having the config files for combos/synergies/default deck json example

View file

@ -30,26 +30,24 @@ services:
ports:
- "8080:8080"
environment:
- PYTHONUNBUFFERED=1
- TERM=xterm-256color
- DEBIAN_FRONTEND=noninteractive
PYTHONUNBUFFERED: "1"
TERM: "xterm-256color"
DEBIAN_FRONTEND: "noninteractive"
# Default theme for first-time visitors (no local preference yet): system|light|dark
# When set to 'light', it maps to the consolidated Light (Blend) palette in the UI
# - ENABLE_THEMES=1
- THEME=dark
# ENABLE_THEMES: "1"
THEME: "dark"
# Logging and error utilities
# - SHOW_LOGS=1
# - SHOW_DIAGNOSTICS=1
# - ENABLE_PWA=1
SHOW_LOGS: "1"
SHOW_DIAGNOSTICS: "1"
# ENABLE_PWA: "1"
# Speed up setup/tagging in Web UI via parallel workers
- WEB_TAG_PARALLEL=1
- WEB_TAG_WORKERS=4
WEB_TAG_PARALLEL: "1"
WEB_TAG_WORKERS: "4"
# Enable virtualization + lazy image tweaks in Step 5
- WEB_VIRTUALIZE=1
WEB_VIRTUALIZE: "1"
# Version label (optional; shown in footer/diagnostics)
- APP_VERSION=v2.2.1
# EDHRec scraping
# - EDHREC_FETCH=1
APP_VERSION: "v2.2.2"
volumes:
- ${PWD}/deck_files:/app/deck_files
- ${PWD}/logs:/app/logs

View file

@ -1,27 +1,27 @@
services:
web:
image: mwisnowski/mtg-python-deckbuilder:latest
# Tip: pin to a specific tag when available, e.g. :2.2.1
# Tip: pin to a specific tag when available, e.g. :2.2.2
container_name: mtg-deckbuilder-web
ports:
- "8080:8080" # Host:Container — open http://localhost:8080
environment:
# UI features/flags (all optional)
- SHOW_LOGS=1 # 1=enable /logs page; 0=hide (default off if unset)
- SHOW_DIAGNOSTICS=1 # 1=enable /diagnostics & /diagnostics/perf; 0=hide (default off)
- ENABLE_PWA=0 # 1=serve manifest/service worker (experimental); 0=disabled
- WEB_VIRTUALIZE=1 # 1=enable list virtualization/lazy tweaks in Web UI; 0=off
- WEB_TAG_PARALLEL=1 # 1=parallelize heavy tagging steps in Web UI; 0=serial
- WEB_TAG_WORKERS=4 # Worker count for parallel tagging (only used if WEB_TAG_PARALLEL=1)
SHOW_LOGS: "1" # 1=enable /logs page; 0=hide (default off if unset)
SHOW_DIAGNOSTICS: "1" # 1=enable /diagnostics & /diagnostics/perf; 0=hide (default off)
ENABLE_PWA: "0" # 1=serve manifest/service worker (experimental); 0=disabled
WEB_VIRTUALIZE: "1" # 1=enable list virtualization/lazy tweaks in Web UI; 0=off
WEB_TAG_PARALLEL: "1" # 1=parallelize heavy tagging steps in Web UI; 0=serial
WEB_TAG_WORKERS: "4" # Worker count for parallel tagging (only used if WEB_TAG_PARALLEL=1)
# Theming (optional)
- THEME=system # Default theme for first-time visitors: system|light|dark
# 'light' maps to the consolidated Light (Blend) palette
- ENABLE_THEMES=1 # 1=show theme selector in header; 0=hide selector
# Note: THEME still applies as the default even if selector is hidden
THEME: "system" # Default theme for first-time visitors: system|light|dark
# 'light' maps to the consolidated Light (Blend) palette
ENABLE_THEMES: "1" # 1=show theme selector in header; 0=hide selector
# Note: THEME still applies as the default even if selector is hidden
# Version label (optional; shown in footer/diagnostics)
- APP_VERSION=v2.2.1
APP_VERSION: "v2.2.2"
volumes:
# Persist app data locally; ensure these directories exist next to this compose file

View file

@ -1,6 +1,28 @@
#!/usr/bin/env sh
set -e
# Seed default config files into /app/config if missing (handles first-run with mounted volume)
seed_defaults() {
# Ensure base config directory exists
mkdir -p /app/config /app/config/card_lists
# Copy from baked-in defaults if targets are missing
if [ -d "/.defaults/config" ]; then
# deck.json
[ -f /app/config/deck.json ] || cp "/.defaults/config/deck.json" "/app/config/deck.json" 2>/dev/null || true
# combos.json and synergies.json
[ -f /app/config/card_lists/combos.json ] || cp "/.defaults/config/card_lists/combos.json" "/app/config/card_lists/combos.json" 2>/dev/null || true
[ -f /app/config/card_lists/synergies.json ] || cp "/.defaults/config/card_lists/synergies.json" "/app/config/card_lists/synergies.json" 2>/dev/null || true
fi
# Back-compat: if someone expects combo.json, symlink to combos.json when present
if [ ! -e /app/config/card_lists/combo.json ] && [ -f /app/config/card_lists/combos.json ]; then
ln -s "combos.json" "/app/config/card_lists/combo.json" 2>/dev/null || true
fi
}
seed_defaults
# Always operate from the code directory for imports to work
cd /app/code || exit 1
@ -8,8 +30,8 @@ cd /app/code || exit 1
MODE="${APP_MODE:-web}"
if [ "$MODE" = "cli" ]; then
# Run the CLI (interactive menu; use DECK_MODE=headless for non-interactive)
exec python main.py
# Run the CLI (interactive menu; use DECK_MODE=headless for non-interactive)
exec python main.py
fi
# Web UI (FastAPI via uvicorn)

View file

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "mtg-deckbuilder"
version = "2.2.1"
version = "2.2.2"
description = "A command-line tool for building and analyzing Magic: The Gathering decks"
readme = "README.md"
license = {file = "LICENSE"}