-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (40 loc) · 1.29 KB
/
Dockerfile
File metadata and controls
49 lines (40 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Base image: Node.js 18 on Debian Bullseye
# We use full Debian (not Alpine) for better compatibility with Python/Edge-TTS/Remotion
FROM node:18-bullseye
# Set working directory
WORKDIR /app
# 1. Install System Dependencies
# - python3 & pip: for edge-tts
# - ffmpeg: for media processing
# - chromium: for Remotion rendering
# - fonts: for better text rendering
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
ffmpeg \
chromium \
fonts-liberation \
fonts-noto-color-emoji \
&& rm -rf /var/lib/apt/lists/*
# 2. Install Python Dependencies (Edge-TTS)
# We specifically need edge-tts for voice generation
RUN pip3 install edge-tts
# 3. Install Node Dependencies
# Copy package files first to leverage Docker cache
COPY package*.json ./
RUN npm install
# 4. Copy Source Code
COPY . .
# 5. Environment Configuration
# Set Puppeteer executable path for Remotion
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
# Configurable environment variables (defaults)
ENV PORT=3000
ENV VIDEO_ORIENTATION=landscape
ENV VIDEO_VOICE=en-US-JennyNeural
# 6. Build/Prepare
# (Optional: if we had a build step, we'd run it here.
# Since it's TS executed via tsx, we just ensure permissions)
# 7. Start Command
# Default to running the batch generator
CMD ["npm", "run", "generate"]