Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/ark1332331_deepwiki.json
T

1 line
58 KiB
JSON

{"repo": "ark1332331/deepwiki", "files": {"Dockerfile": {"caf6264524a4a4806e08743ed77afa00ac4e2e0c": {"t": 1785746996.5007257, "n": 3940, "h": "0c3571656f6f0c59", "c": "# Build argument for custom certificates directory\nARG CUSTOM_CERT_DIR=\"certs\"\n\nFROM node:20-alpine3.22 AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\n# Copy only necessary files for Next.js build\nCOPY package.json package-lock.json next.config.ts tsconfig.json tailwind.config.js postcss.config.mjs ./\nCOPY src/ ./src/\nCOPY public/ ./public/\n# Increase Node.js memory limit for build and disable telemetry\nENV NODE_OPTIONS=\"--max-old-space-size=4096\"\nENV NEXT_TELEMETRY_DISABLED=1\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /api\nCOPY api/pyproject.toml .\nCOPY api/poetry.lock .\nRUN python -m pip install poetry==2.0.1 --no-cache-dir && \\\n poetry config virtualenvs.create true --local && \\\n poetry config virtualenvs.in-project true --local && \\\n poetry config virtualenvs.options.always-copy --local true && \\\n POETRY_MAX_WORKERS=10 poetry install --no-interaction --no-ansi --only main && \\\n poetry cache clear --all .\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n ca-certificates \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\n# Update certificates if custom ones were provided and copied successfully\nRUN if [ -n \"${CUSTOM_CERT_DIR}\" ]; then \\\n mkdir -p /usr/local/share/ca-certificates && \\\n if [ -d \"${CUSTOM_CERT_DIR}\" ]; then \\\n cp -r ${CUSTOM_CERT_DIR}/* /usr/local/share/ca-certificates/ 2>/dev/null || true; \\\n update-ca-certificates; \\\n echo \"Custom certificates installed successfully.\"; \\\n else \\\n echo \"Warning: ${CUSTOM_CERT_DIR} not found. Skipping certificate installation.\"; \\\n fi \\\n fi\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /api/.venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Basic env sanity check (provider-specific keys are required depending on your selection)\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] && [ -z \"$GOOGLE_API_KEY\" ] && [ -z \"$DEEPSEEK_API_KEY\" ] && [ -z \"$OPENROUTER_API_KEY\" ] && [ -z \"$AZURE_OPENAI_API_KEY\" ] && [ -z \"$SILICONCLOUD_API_KEY\" ]; then\\n\\\n echo \"Warning: No API keys detected. Set provider-specific keys in .env (e.g. OPENAI_API_KEY/GOOGLE_API_KEY/DEEPSEEK_API_KEY/OPENROUTER_API_KEY/AZURE_OPENAI_API_KEY/SILICONCLOUD_API_KEY) or use Ollama for local mode.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "ac35556479e175799846825aef246ea0ab82ced4": {"t": 1785769618.5233476, "n": 3844, "h": "b5af9a70d667912e", "c": "# syntax=docker/dockerfile:1-labs\n\n# Build argument for custom certificates directory\nARG CUSTOM_CERT_DIR=\"certs\"\n\nFROM node:20-alpine3.22 AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\n# Copy only necessary files for Next.js build\nCOPY package.json package-lock.json next.config.ts tsconfig.json tailwind.config.js postcss.config.mjs ./\nCOPY src/ ./src/\nCOPY public/ ./public/\n# Increase Node.js memory limit for build and disable telemetry\nENV NODE_OPTIONS=\"--max-old-space-size=4096\"\nENV NEXT_TELEMETRY_DISABLED=1\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /api\nCOPY api/pyproject.toml .\nCOPY api/poetry.lock .\nRUN python -m pip install poetry==2.0.1 --no-cache-dir && \\\n poetry config virtualenvs.create true --local && \\\n poetry config virtualenvs.in-project true --local && \\\n poetry config virtualenvs.options.always-copy --local true && \\\n POETRY_MAX_WORKERS=10 poetry install --no-interaction --no-ansi --only main && \\\n poetry cache clear --all .\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n ca-certificates \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\n# Update certificates if custom ones were provided and copied successfully\nRUN if [ -n \"${CUSTOM_CERT_DIR}\" ]; then \\\n mkdir -p /usr/local/share/ca-certificates && \\\n if [ -d \"${CUSTOM_CERT_DIR}\" ]; then \\\n cp -r ${CUSTOM_CERT_DIR}/* /usr/local/share/ca-certificates/ 2>/dev/null || true; \\\n update-ca-certificates; \\\n echo \"Custom certificates installed successfully.\"; \\\n else \\\n echo \"Warning: ${CUSTOM_CERT_DIR} not found. Skipping certificate installation.\"; \\\n fi \\\n fi\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /api/.venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "f8884268e9be772abe64ae87cb69a60d1149da16": {"t": 1785769619.9985273, "n": 3580, "h": "f7ef05c779e99991", "c": "# syntax=docker/dockerfile:1-labs\n\n# Build argument for custom certificates directory\nARG CUSTOM_CERT_DIR=\"certs\"\n\nFROM node:20-alpine3.22 AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\n# Copy only necessary files for Next.js build\nCOPY package.json package-lock.json next.config.ts tsconfig.json tailwind.config.js postcss.config.mjs ./\nCOPY src/ ./src/\nCOPY public/ ./public/\n# Increase Node.js memory limit for build and disable telemetry\nENV NODE_OPTIONS=\"--max-old-space-size=4096\"\nENV NEXT_TELEMETRY_DISABLED=1\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /app\nRUN python -m venv /opt/venv\nENV PATH=\"/opt/venv/bin:$PATH\"\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache -r api/requirements.txt\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n ca-certificates \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\n# Update certificates if custom ones were provided and copied successfully\nRUN if [ -n \"${CUSTOM_CERT_DIR}\" ]; then \\\n mkdir -p /usr/local/share/ca-certificates && \\\n if [ -d \"${CUSTOM_CERT_DIR}\" ]; then \\\n cp -r ${CUSTOM_CERT_DIR}/* /usr/local/share/ca-certificates/ 2>/dev/null || true; \\\n update-ca-certificates; \\\n echo \"Custom certificates installed successfully.\"; \\\n else \\\n echo \"Warning: ${CUSTOM_CERT_DIR} not found. Skipping certificate installation.\"; \\\n fi \\\n fi\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /opt/venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "acfdc271a0f97e7c00c6a98b483d74ab3762144e": {"t": 1785769622.2327285, "n": 2922, "h": "8c90140b7fa43b70", "c": "# syntax=docker/dockerfile:1-labs\n\nFROM node:20-alpine AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\n# Copy only necessary files for Next.js build\nCOPY package.json package-lock.json next.config.ts tsconfig.json tailwind.config.js postcss.config.mjs ./\nCOPY src/ ./src/\nCOPY public/ ./public/\n# Increase Node.js memory limit for build and disable telemetry\nENV NODE_OPTIONS=\"--max-old-space-size=4096\"\nENV NEXT_TELEMETRY_DISABLED=1\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /app\nRUN python -m venv /opt/venv\nENV PATH=\"/opt/venv/bin:$PATH\"\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache -r api/requirements.txt\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /opt/venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "5f8e4f753b44ac2aa680b19458831f5641d6ad6a": {"t": 1785769624.1661463, "n": 2616, "h": "5a1940411bff8a25", "c": "# syntax=docker/dockerfile:1-labs\n\nFROM node:20-alpine AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\nCOPY --exclude=./api . .\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /app\nRUN python -m venv /opt/venv\nENV PATH=\"/opt/venv/bin:$PATH\"\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache -r api/requirements.txt\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /opt/venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "83e8a2dce61b12203fd512c054343da87bca7605": {"t": 1785769625.4005861, "n": 2628, "h": "8d7d839c0ac028db", "c": "# syntax=docker/dockerfile:1-labs\n\nFROM node:20-alpine AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\nCOPY --exclude=./api . .\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /app\nRUN python -m venv /opt/venv\nENV PATH=\"/opt/venv/bin:$PATH\"\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache -r api/requirements.txt\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /opt/venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV NEXT_PUBLIC_SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "7123d52ecd975cb2f0f2138f3c5f070be5eb2c47": {"t": 1785769626.5695646, "n": 2618, "h": "f6de90e9e164f1f7", "c": "# syntax=docker/dockerfile:1-labs\n\nFROM node:20-alpine AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\nCOPY --exclude=./api . .\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /app\nRUN python -m venv /opt/venv\nENV PATH=\"/opt/venv/bin:$PATH\"\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache -r api/requirements.txt\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /opt/venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV NEXT_PUBLIC_SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "aa40dc52879291f95af82d040932e377fd773a45": {"t": 1785769629.8482556, "n": 2618, "h": "d210b9873edcb110", "c": "# syntax=docker/dockerfile:1-labs\n\nFROM node:18-alpine AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\nCOPY --exclude=./api . .\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /app\nRUN python -m venv /opt/venv\nENV PATH=\"/opt/venv/bin:$PATH\"\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache -r api/requirements.txt\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /opt/venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV NEXT_PUBLIC_SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "00bb09a8e20a225859e54b24240d2e773a010b91": {"t": 1785769631.5510292, "n": 2203, "h": "f31456b234a53188", "c": "# Use Python 3.11 as base image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\n# Copy Python requirements and install dependencies\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache-dir -r api/requirements.txt\n\n# Copy package.json and install Node.js dependencies\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\n# Copy the rest of the application\nCOPY . .\n\n# Build the Next.js application\nRUN NODE_ENV=production npm run build\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\n\\n\\\n# Start the Next.js app on port 3000 explicitly\\n\\\nnpm run start -- -p 3000\\n\\\n' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV NEXT_PUBLIC_SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "1db500ee3d0b4fa65b0d6c83c1c4773790dc26ed": {"t": 1785769633.7778041, "n": 2085, "h": "ff11f1c017219514", "c": "# Use Python 3.11 as base image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\n# Copy Python requirements and install dependencies\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache-dir -r api/requirements.txt\n\n# Copy package.json and install Node.js dependencies\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\n# Copy the rest of the application\nCOPY . .\n\n# Build the Next.js application\nRUN NODE_ENV=production npm run build\n\n# Expose the port the app runs on\nEXPOSE 8001 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background\\n\\\npython -m api.main &\\n\\\n\\n\\\n# Start the Next.js app on port 3000 explicitly\\n\\\nnpm run start -- -p 3000\\n\\\n' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "5a4ea635e114f3956f2dc39e4ac24b9a01c97a99": {"t": 1785769636.8892708, "n": 2046, "h": "0d06ea97e1411bf4", "c": "# Use Python 3.11 as base image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\n# Copy Python requirements and install dependencies\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache-dir -r api/requirements.txt\n\n# Copy package.json and install Node.js dependencies\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\n# Copy the rest of the application\nCOPY . .\n\n# Build the Next.js application\nRUN NODE_ENV=production npm run build\n\n# Expose the port the app runs on\nEXPOSE 8001 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background\\n\\\npython -m api.main &\\n\\\n# Start the Next.js app\\n\\\nnpm run start\\n\\\n' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "127f95bc4c6c5c47f97438fa1512a7c6ecc10e3d": {"t": 1785769638.1138606, "n": 1607, "h": "d6ba67cb83f69511", "c": "# Use Python 3.11 as base image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\n# Copy Python requirements and install dependencies\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache-dir -r api/requirements.txt\n\n# Copy package.json and install Node.js dependencies\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\n# Copy the rest of the application\nCOPY . .\n\n# Build the Next.js application\nRUN NODE_ENV=production npm run build\n\n# Expose the port the app runs on\nEXPOSE 8001 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs)\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background\\n\\\npython -m api.main &\\n\\\n# Start the Next.js app\\n\\\nnpm run start\\n\\\n' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\n\n# Copy .env file if it exists\nCOPY .env ./\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "420e7bc9a0957ed18744eda74fe9bf969a8b765f": {"t": 1785769639.3309002, "n": 1428, "h": "9ee4b87670768916", "c": "# Use Python 3.11 as base image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\n# Copy Python requirements and install dependencies\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache-dir -r api/requirements.txt\n\n# Copy package.json and install Node.js dependencies\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\n# Copy the rest of the application\nCOPY . .\n\n# Build the Next.js application\nRUN NODE_ENV=production npm run build\n\n# Expose the port the app runs on\nEXPOSE 8001 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Start the API server in the background\\n\\\npython -m api.main &\\n\\\n# Start the Next.js app\\n\\\nnpm run start\\n\\\n' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "0b8178da63a991a0708c88acb4ff8372c86a81e8": {"t": 1785769640.5865066, "n": 1070, "h": "6bf0ab99af269c25", "c": "# Use Python 3.11 as base image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n nodejs \\\n npm \\\n git \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\n# Upgrade npm to latest version\nRUN npm install -g npm@latest\n\n# Copy Python requirements and install dependencies\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache-dir -r api/requirements.txt\n\n# Copy package.json and install Node.js dependencies\nCOPY package.json package-lock.json ./\nRUN npm install\n\n# Copy the rest of the application\nCOPY . .\n\n# Build the Next.js application\nRUN npm run build\n\n# Expose the port the app runs on\nEXPOSE 8001 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Start the API server in the background\\n\\\npython -m api.main &\\n\\\n# Start the Next.js app\\n\\\nnpm run start\\n\\\n' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}}, "Dockerfile-ollama-local": {"caf6264524a4a4806e08743ed77afa00ac4e2e0c": {"t": 1785747010.6107464, "n": 4224, "h": "f4cb6b771455c374", "c": "FROM node:20-alpine AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\nCOPY package.json package-lock.json next.config.ts tsconfig.json tailwind.config.js postcss.config.mjs ./\nCOPY src/ ./src/\nCOPY public/ ./public/\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /api\nCOPY api/pyproject.toml .\nCOPY api/poetry.lock .\nRUN python -m pip install poetry==2.0.1 --no-cache-dir && \\\n poetry config virtualenvs.create true --local && \\\n poetry config virtualenvs.in-project true --local && \\\n poetry config virtualenvs.options.always-copy --local true && \\\n POETRY_MAX_WORKERS=10 poetry install --no-interaction --no-ansi --only main && \\\n poetry cache clear --all .\n\nFROM python:3.11-slim AS ollama_base\nRUN apt-get update && apt-get install -y --no-install-recommends \\\n curl zstd && rm -rf /var/lib/apt/lists/*\n\n# Detect architecture and download appropriate Ollama version\n# ARG TARGETARCH can be set at build time with --build-arg TARGETARCH=arm64 or TARGETARCH=amd64\nARG TARGETARCH=arm64\nRUN OLLAMA_ARCH=\"\" && \\\n if [ \"$TARGETARCH\" = \"arm64\" ]; then \\\n echo \"Building for ARM64 architecture.\" && \\\n OLLAMA_ARCH=\"arm64\"; \\\n elif [ \"$TARGETARCH\" = \"amd64\" ]; then \\\n echo \"Building for AMD64 architecture.\" && \\\n OLLAMA_ARCH=\"amd64\"; \\\n else \\\n echo \"Error: Unsupported architecture '$TARGETARCH'. Supported architectures are 'arm64' and 'amd64'.\" >&2 && \\\n exit 1; \\\n fi && \\\n (set -o pipefail; \\\n curl -fL \"https://ollama.com/download/ollama-linux-${OLLAMA_ARCH}.tar.zst\" \\\n | zstd -d | tar -x -C /usr)\n\nRUN ollama serve > /dev/null 2>&1 & \\\n sleep 20 && \\\n ollama pull nomic-embed-text && \\\n ollama pull qwen3:1.7b\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /api/.venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\nCOPY --from=ollama_base /usr/bin/ollama /usr/local/bin/\nCOPY --from=ollama_base /root/.ollama /root/.ollama\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Start ollama serve in background\\n\\\nollama serve > /dev/null 2>&1 &\\n\\\n\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Basic env sanity check (provider-specific keys are required depending on your selection)\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] && [ -z \"$GOOGLE_API_KEY\" ] && [ -z \"$DEEPSEEK_API_KEY\" ] && [ -z \"$OPENROUTER_API_KEY\" ] && [ -z \"$AZURE_OPENAI_API_KEY\" ] && [ -z \"$SILICONCLOUD_API_KEY\" ]; then\\n\\\n echo \"Warning: No API keys detected. This can be OK for full-local Ollama mode, otherwise set provider-specific keys in .env.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "00adb8c876af056cff9e144cdcf2eb204edb7aed": {"t": 1785769621.0605717, "n": 4098, "h": "2f14e7a415ccdbe1", "c": "# syntax=docker/dockerfile:1-labs\n\nFROM node:20-alpine AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\nCOPY --exclude=./api . .\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /api\nCOPY api/pyproject.toml .\nCOPY api/poetry.lock .\nRUN python -m pip install poetry==2.0.1 --no-cache-dir && \\\n poetry config virtualenvs.create true --local && \\\n poetry config virtualenvs.in-project true --local && \\\n poetry config virtualenvs.options.always-copy --local true && \\\n POETRY_MAX_WORKERS=10 poetry install --no-interaction --no-ansi --only main && \\\n poetry cache clear --all .\n\nFROM python:3.11-slim AS ollama_base\nRUN apt-get update && apt-get install -y --no-install-recommends \\\n curl zstd && rm -rf /var/lib/apt/lists/*\n\n# Detect architecture and download appropriate Ollama version\n# ARG TARGETARCH can be set at build time with --build-arg TARGETARCH=arm64 or TARGETARCH=amd64\nARG TARGETARCH=arm64\nRUN OLLAMA_ARCH=\"\" && \\\n if [ \"$TARGETARCH\" = \"arm64\" ]; then \\\n echo \"Building for ARM64 architecture.\" && \\\n OLLAMA_ARCH=\"arm64\"; \\\n elif [ \"$TARGETARCH\" = \"amd64\" ]; then \\\n echo \"Building for AMD64 architecture.\" && \\\n OLLAMA_ARCH=\"amd64\"; \\\n else \\\n echo \"Error: Unsupported architecture '$TARGETARCH'. Supported architectures are 'arm64' and 'amd64'.\" >&2 && \\\n exit 1; \\\n fi && \\\n (set -o pipefail; \\\n curl -fL \"https://ollama.com/download/ollama-linux-${OLLAMA_ARCH}.tar.zst\" \\\n | zstd -d | tar -x -C /usr)\n\nRUN ollama serve > /dev/null 2>&1 & \\\n sleep 20 && \\\n ollama pull nomic-embed-text && \\\n ollama pull qwen3:1.7b\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /api/.venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\nCOPY --from=ollama_base /usr/bin/ollama /usr/local/bin/\nCOPY --from=ollama_base /root/.ollama /root/.ollama\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Start ollama serve in background\\n\\\nollama serve > /dev/null 2>&1 &\\n\\\n\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "ac35556479e175799846825aef246ea0ab82ced4": {"t": 1785769622.5152795, "n": 4045, "h": "5aab3a2e1eb0f8a4", "c": "# syntax=docker/dockerfile:1-labs\n\nFROM node:20-alpine AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\nCOPY --exclude=./api . .\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /api\nCOPY api/pyproject.toml .\nCOPY api/poetry.lock .\nRUN python -m pip install poetry==2.0.1 --no-cache-dir && \\\n poetry config virtualenvs.create true --local && \\\n poetry config virtualenvs.in-project true --local && \\\n poetry config virtualenvs.options.always-copy --local true && \\\n POETRY_MAX_WORKERS=10 poetry install --no-interaction --no-ansi --only main && \\\n poetry cache clear --all .\n\nFROM python:3.11-slim AS ollama_base\nRUN apt-get update && apt-get install -y \\\n curl\n# Detect architecture and download appropriate Ollama version\n# ARG TARGETARCH can be set at build time with --build-arg TARGETARCH=arm64 or TARGETARCH=amd64\nARG TARGETARCH=arm64\nRUN OLLAMA_ARCH=\"\" && \\\n if [ \"$TARGETARCH\" = \"arm64\" ]; then \\\n echo \"Building for ARM64 architecture.\" && \\\n OLLAMA_ARCH=\"arm64\"; \\\n elif [ \"$TARGETARCH\" = \"amd64\" ]; then \\\n echo \"Building for AMD64 architecture.\" && \\\n OLLAMA_ARCH=\"amd64\"; \\\n else \\\n echo \"Error: Unsupported architecture '$TARGETARCH'. Supported architectures are 'arm64' and 'amd64'.\" >&2 && \\\n exit 1; \\\n fi && \\\n curl -L \"https://ollama.com/download/ollama-linux-${OLLAMA_ARCH}.tgz\" -o ollama.tgz && \\\n tar -C /usr -xzf ollama.tgz && \\\n rm ollama.tgz\n\nRUN ollama serve > /dev/null 2>&1 & \\\n sleep 20 && \\\n ollama pull nomic-embed-text && \\\n ollama pull qwen3:1.7b\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /api/.venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\nCOPY --from=ollama_base /usr/bin/ollama /usr/local/bin/\nCOPY --from=ollama_base /root/.ollama /root/.ollama\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Start ollama serve in background\\n\\\nollama serve > /dev/null 2>&1 &\\n\\\n\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "4b6410b1f47572b35480e1846606db634e2a2d59": {"t": 1785769624.3675344, "n": 3781, "h": "af095778613cfb90", "c": "# syntax=docker/dockerfile:1-labs\n\nFROM node:20-alpine AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\nCOPY --exclude=./api . .\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /app\nRUN python -m venv /opt/venv\nENV PATH=\"/opt/venv/bin:$PATH\"\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache -r api/requirements.txt\n\nFROM python:3.11-slim AS ollama_base\nRUN apt-get update && apt-get install -y \\\n curl\n# Detect architecture and download appropriate Ollama version\n# ARG TARGETARCH can be set at build time with --build-arg TARGETARCH=arm64 or TARGETARCH=amd64\nARG TARGETARCH=arm64\nRUN OLLAMA_ARCH=\"\" && \\\n if [ \"$TARGETARCH\" = \"arm64\" ]; then \\\n echo \"Building for ARM64 architecture.\" && \\\n OLLAMA_ARCH=\"arm64\"; \\\n elif [ \"$TARGETARCH\" = \"amd64\" ]; then \\\n echo \"Building for AMD64 architecture.\" && \\\n OLLAMA_ARCH=\"amd64\"; \\\n else \\\n echo \"Error: Unsupported architecture '$TARGETARCH'. Supported architectures are 'arm64' and 'amd64'.\" >&2 && \\\n exit 1; \\\n fi && \\\n curl -L \"https://ollama.com/download/ollama-linux-${OLLAMA_ARCH}.tgz\" -o ollama.tgz && \\\n tar -C /usr -xzf ollama.tgz && \\\n rm ollama.tgz\n\nRUN ollama serve > /dev/null 2>&1 & \\\n sleep 20 && \\\n ollama pull nomic-embed-text && \\\n ollama pull qwen3:1.7b\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /opt/venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\nCOPY --from=ollama_base /usr/bin/ollama /usr/local/bin/\nCOPY --from=ollama_base /root/.ollama /root/.ollama\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Start ollama serve in background\\n\\\nollama serve > /dev/null 2>&1 &\\n\\\n\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}, "bda949aed54e5be5457213829c979d99366f77bc": {"t": 1785769626.195187, "n": 3145, "h": "9751a6e04f622bd9", "c": "# syntax=docker/dockerfile:1-labs\n\nFROM node:20-alpine AS node_base\n\nFROM node_base AS node_deps\nWORKDIR /app\nCOPY package.json package-lock.json ./\nRUN npm ci --legacy-peer-deps\n\nFROM node_base AS node_builder\nWORKDIR /app\nCOPY --from=node_deps /app/node_modules ./node_modules\nCOPY --exclude=./api . .\nRUN NODE_ENV=production npm run build\n\nFROM python:3.11-slim AS py_deps\nWORKDIR /app\nRUN python -m venv /opt/venv\nENV PATH=\"/opt/venv/bin:$PATH\"\nCOPY api/requirements.txt ./api/\nRUN pip install --no-cache -r api/requirements.txt\n\nFROM python:3.11-slim AS ollama_base\nRUN apt-get update && apt-get install -y \\\n curl\nRUN curl -L https://ollama.com/download/ollama-linux-amd64.tgz -o ollama-linux-amd64.tgz\nRUN tar -C /usr -xzf ollama-linux-amd64.tgz\nRUN ollama serve > /dev/null 2>&1 & \\\n sleep 20 && \\\n ollama pull nomic-embed-text && \\\n ollama pull qwen3:1.7b\n\n# Use Python 3.11 as final image\nFROM python:3.11-slim\n\n# Set working directory\nWORKDIR /app\n\n# Install Node.js and npm\nRUN apt-get update && apt-get install -y \\\n curl \\\n gnupg \\\n git \\\n && mkdir -p /etc/apt/keyrings \\\n && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \\\n && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list \\\n && apt-get update \\\n && apt-get install -y nodejs \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\nENV PATH=\"/opt/venv/bin:$PATH\"\n\n# Copy Python dependencies\nCOPY --from=py_deps /opt/venv /opt/venv\nCOPY api/ ./api/\n\n# Copy Node app\nCOPY --from=node_builder /app/public ./public\nCOPY --from=node_builder /app/.next/standalone ./\nCOPY --from=node_builder /app/.next/static ./.next/static\nCOPY --from=ollama_base /usr/bin/ollama /usr/local/bin/\nCOPY --from=ollama_base /root/.ollama /root/.ollama\n\n# Expose the port the app runs on\nEXPOSE ${PORT:-8001} 3000\n\n# Create a script to run both backend and frontend\nRUN echo '#!/bin/bash\\n\\\n# Start ollama serve in background\\n\\\nollama serve > /dev/null 2>&1 &\\n\\\n\\n\\\n# Load environment variables from .env file if it exists\\n\\\nif [ -f .env ]; then\\n\\\n export $(grep -v \"^#\" .env | xargs -r)\\n\\\nfi\\n\\\n\\n\\\n# Check for required environment variables\\n\\\nif [ -z \"$OPENAI_API_KEY\" ] || [ -z \"$GOOGLE_API_KEY\" ]; then\\n\\\n echo \"Warning: OPENAI_API_KEY and/or GOOGLE_API_KEY environment variables are not set.\"\\n\\\n echo \"These are required for DeepWiki to function properly.\"\\n\\\n echo \"You can provide them via a mounted .env file or as environment variables when running the container.\"\\n\\\nfi\\n\\\n\\n\\\n# Start the API server in the background with the configured port\\n\\\npython -m api.main --port ${PORT:-8001} &\\n\\\nPORT=3000 HOSTNAME=0.0.0.0 node server.js &\\n\\\nwait -n\\n\\\nexit $?' > /app/start.sh && chmod +x /app/start.sh\n\n# Set environment variables\nENV PORT=8001\nENV NODE_ENV=production\nENV SERVER_BASE_URL=http://localhost:${PORT:-8001}\n\n# Create empty .env file (will be overridden if one exists at runtime)\nRUN touch .env\n\n# Command to run the application\nCMD [\"/app/start.sh\"]\n"}}}}