mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-16 23:50:12 +01:00
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:
parent
1988f98c5b
commit
a0a12baa9b
7 changed files with 69 additions and 30 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -12,6 +12,17 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning
|
||||||
|
|
||||||
## [Unreleased]
|
## [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
|
## [2.2.1] - 2025-09-01
|
||||||
### Added
|
### 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.
|
- 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.
|
||||||
|
|
|
||||||
|
|
@ -24,11 +24,16 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||||
# Copy application code
|
# Copy application code
|
||||||
COPY code/ ./code/
|
COPY code/ ./code/
|
||||||
COPY mypy.ini .
|
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/ ./config/
|
||||||
|
COPY config/ /.defaults/config/
|
||||||
RUN mkdir -p owned_cards
|
RUN mkdir -p owned_cards
|
||||||
|
|
||||||
# Create necessary directories as mount points
|
# 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
|
# Create volumes for persistent data
|
||||||
VOLUME ["/app/deck_files", "/app/logs", "/app/csv_files", "/app/config", "/app/owned_cards"]
|
VOLUME ["/app/deck_files", "/app/logs", "/app/csv_files", "/app/config", "/app/owned_cards"]
|
||||||
|
|
|
||||||
|
|
@ -33,3 +33,6 @@
|
||||||
- Existing completed pairs are counted toward the target; only missing partners are added.
|
- Existing completed pairs are counted toward the target; only missing partners are added.
|
||||||
- No changes to CLI inputs for this feature in this release.
|
- 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.
|
- 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
|
||||||
|
|
@ -30,26 +30,24 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
environment:
|
environment:
|
||||||
- PYTHONUNBUFFERED=1
|
PYTHONUNBUFFERED: "1"
|
||||||
- TERM=xterm-256color
|
TERM: "xterm-256color"
|
||||||
- DEBIAN_FRONTEND=noninteractive
|
DEBIAN_FRONTEND: "noninteractive"
|
||||||
# Default theme for first-time visitors (no local preference yet): system|light|dark
|
# 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
|
# When set to 'light', it maps to the consolidated Light (Blend) palette in the UI
|
||||||
# - ENABLE_THEMES=1
|
# ENABLE_THEMES: "1"
|
||||||
- THEME=dark
|
THEME: "dark"
|
||||||
# Logging and error utilities
|
# Logging and error utilities
|
||||||
# - SHOW_LOGS=1
|
SHOW_LOGS: "1"
|
||||||
# - SHOW_DIAGNOSTICS=1
|
SHOW_DIAGNOSTICS: "1"
|
||||||
# - ENABLE_PWA=1
|
# ENABLE_PWA: "1"
|
||||||
# Speed up setup/tagging in Web UI via parallel workers
|
# Speed up setup/tagging in Web UI via parallel workers
|
||||||
- WEB_TAG_PARALLEL=1
|
WEB_TAG_PARALLEL: "1"
|
||||||
- WEB_TAG_WORKERS=4
|
WEB_TAG_WORKERS: "4"
|
||||||
# Enable virtualization + lazy image tweaks in Step 5
|
# Enable virtualization + lazy image tweaks in Step 5
|
||||||
- WEB_VIRTUALIZE=1
|
WEB_VIRTUALIZE: "1"
|
||||||
# Version label (optional; shown in footer/diagnostics)
|
# Version label (optional; shown in footer/diagnostics)
|
||||||
- APP_VERSION=v2.2.1
|
APP_VERSION: "v2.2.2"
|
||||||
# EDHRec scraping
|
|
||||||
# - EDHREC_FETCH=1
|
|
||||||
volumes:
|
volumes:
|
||||||
- ${PWD}/deck_files:/app/deck_files
|
- ${PWD}/deck_files:/app/deck_files
|
||||||
- ${PWD}/logs:/app/logs
|
- ${PWD}/logs:/app/logs
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,27 @@
|
||||||
services:
|
services:
|
||||||
web:
|
web:
|
||||||
image: mwisnowski/mtg-python-deckbuilder:latest
|
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
|
container_name: mtg-deckbuilder-web
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080" # Host:Container — open http://localhost:8080
|
- "8080:8080" # Host:Container — open http://localhost:8080
|
||||||
environment:
|
environment:
|
||||||
# UI features/flags (all optional)
|
# UI features/flags (all optional)
|
||||||
- SHOW_LOGS=1 # 1=enable /logs page; 0=hide (default off if unset)
|
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)
|
SHOW_DIAGNOSTICS: "1" # 1=enable /diagnostics & /diagnostics/perf; 0=hide (default off)
|
||||||
- ENABLE_PWA=0 # 1=serve manifest/service worker (experimental); 0=disabled
|
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_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_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)
|
WEB_TAG_WORKERS: "4" # Worker count for parallel tagging (only used if WEB_TAG_PARALLEL=1)
|
||||||
|
|
||||||
# Theming (optional)
|
# Theming (optional)
|
||||||
- THEME=system # Default theme for first-time visitors: system|light|dark
|
THEME: "system" # Default theme for first-time visitors: system|light|dark
|
||||||
# 'light' maps to the consolidated Light (Blend) palette
|
# 'light' maps to the consolidated Light (Blend) palette
|
||||||
- ENABLE_THEMES=1 # 1=show theme selector in header; 0=hide selector
|
ENABLE_THEMES: "1" # 1=show theme selector in header; 0=hide selector
|
||||||
# Note: THEME still applies as the default even if selector is hidden
|
# Note: THEME still applies as the default even if selector is hidden
|
||||||
|
|
||||||
# Version label (optional; shown in footer/diagnostics)
|
# Version label (optional; shown in footer/diagnostics)
|
||||||
- APP_VERSION=v2.2.1
|
APP_VERSION: "v2.2.2"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
# Persist app data locally; ensure these directories exist next to this compose file
|
# Persist app data locally; ensure these directories exist next to this compose file
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,28 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
set -e
|
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
|
# Always operate from the code directory for imports to work
|
||||||
cd /app/code || exit 1
|
cd /app/code || exit 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "mtg-deckbuilder"
|
name = "mtg-deckbuilder"
|
||||||
version = "2.2.1"
|
version = "2.2.2"
|
||||||
description = "A command-line tool for building and analyzing Magic: The Gathering decks"
|
description = "A command-line tool for building and analyzing Magic: The Gathering decks"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = {file = "LICENSE"}
|
license = {file = "LICENSE"}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue