# Basis: Python (da die Installation von Python-Deps oft am längsten dauert und Kompilierung braucht) FROM python:3.11-slim WORKDIR /app # 1. System-Updates & Node.js Installation (v20) # curl ist nötig, um Node zu holen. RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ ca-certificates \ && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ && apt-get install -y nodejs \ && apt-get clean && rm -rf /var/lib/apt/lists/* # 2. Python Dependencies (Cached Layer) COPY market-intel.requirements.txt . RUN pip install --no-cache-dir -r market-intel.requirements.txt # 3. Node Dependencies (Cached Layer) COPY general-market-intelligence/package.json ./general-market-intelligence/ # Wir installieren nur Production-Deps für den Server, falls nötig. # ACHTUNG: Der Backend-Container führt hier server.cjs aus. RUN cd general-market-intelligence && npm install --omit=dev # 4. App Code COPY general-market-intelligence/server.cjs ./general-market-intelligence/ COPY market_intel_orchestrator.py . COPY market_db_manager.py . COPY config.py . COPY gemini_api_key.txt . # (Falls helpers.py existiert, wird sie durch docker-compose volume gemountet, aber wir kopieren sie für Standalone-Builds) COPY helpers.py . EXPOSE 3001 CMD ["node", "general-market-intelligence/server.cjs"]