Files
Brancheneinstufung2/content-engine/Dockerfile

42 lines
1.0 KiB
Docker

FROM node:20-slim AS frontend-build
WORKDIR /app/frontend
# Correct path relative to build context (root)
COPY content-engine/frontend/package*.json ./
RUN npm install
COPY content-engine/frontend/ ./
RUN npm run build
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
gnupg \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY content-engine/requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Install Backend Node dependencies
COPY content-engine/package.json ./
RUN npm install
# Copy backend files
COPY content-engine/*.py ./
COPY content-engine/server.cjs ./
# Helpers and Config from root
COPY helpers.py ./
COPY config.py ./
# Copy built frontend
COPY --from=frontend-build /app/frontend/dist ./dist
# Keys and persistence placeholders
RUN touch gemini_api_key.txt serpapikey.txt
EXPOSE 3006
CMD ["node", "server.cjs"]