feat: MTGJSON data manager service with download, unpack, and upsert
- Created MTGJSONManager service for complete data lifecycle - Handles download, unpack (gzip/zip), and PostgreSQL upsert - ON CONFLICT DO UPDATE preserves existing data - Startup triggers initial download on first container init - Health check verifies MTG data exists in database - Weekly refresh via MTG_REFRESH_INTERVAL_DAYS setting - Updated docker-compose start_period to 600s for download time
This commit is contained in:
+2
-2
@@ -116,9 +116,9 @@ services:
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
timeout: 30s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
start_period: 600s # 10 minutes for initial data download
|
||||
|
||||
# Weekly database refresh (runs on a schedule)
|
||||
mtg-refresh:
|
||||
|
||||
Reference in New Issue
Block a user