35 lines
854 B
Docker
35 lines
854 B
Docker
FROM node:18-bookworm-slim
|
|
|
|
# Install Chromium and FFmpeg for Remotion rendering
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends chromium ffmpeg && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
|
ENV REMOTION_BUNDLE_PATH=/app/remotion
|
|
ENV OUTPUT_DIR=/output
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy render service source
|
|
COPY render-service/package.json ./
|
|
RUN npm install
|
|
|
|
COPY render-service/tsconfig.json ./
|
|
COPY render-service/src/ ./src/
|
|
|
|
# Copy remotion source for bundling
|
|
COPY remotion/package.json /app/remotion/package.json
|
|
COPY remotion/tsconfig.json /app/remotion/tsconfig.json
|
|
COPY remotion/src/ /app/remotion/src/
|
|
COPY remotion/public/ /app/remotion/public/
|
|
|
|
# Install remotion deps
|
|
RUN cd /app/remotion && npm install
|
|
|
|
# Build TypeScript
|
|
RUN npm run build
|
|
|
|
EXPOSE 3100
|
|
CMD ["node", "dist/server.js"]
|