From 0c58baed42496a3df0e750e76838d18f9a890002 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 30 Oct 2025 20:53:44 -0400 Subject: [PATCH] fix: separate data scripts from volume mount directory Move get_daily_price.py and merge_jsonl.py to /app/scripts to prevent volume mount from overlaying the scripts. Scripts run from /app/data context to output correctly. Fixes container startup error where scripts were not found after ./data volume mount replaced container's /app/data. --- Dockerfile | 6 ++++++ entrypoint.sh | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index af42ca6..8b9a360 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,12 @@ WORKDIR /app # Copy application code COPY . . +# Copy data scripts to separate directory (volume mount won't overlay these) +RUN mkdir -p /app/scripts && \ + cp data/get_daily_price.py /app/scripts/ && \ + cp data/get_interdaily_price.py /app/scripts/ && \ + cp data/merge_jsonl.py /app/scripts/ + # Create necessary directories RUN mkdir -p data logs data/agent_data diff --git a/entrypoint.sh b/entrypoint.sh index 7019671..9c80ea1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,9 +5,10 @@ echo "🚀 Starting AI-Trader..." # Step 1: Data preparation echo "📊 Fetching and merging price data..." +# Run scripts from /app/scripts but output to /app/data cd /app/data -python get_daily_price.py -python merge_jsonl.py +python /app/scripts/get_daily_price.py +python /app/scripts/merge_jsonl.py cd /app # Step 2: Start MCP services in background