-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (26 loc) · 799 Bytes
/
Dockerfile
File metadata and controls
38 lines (26 loc) · 799 Bytes
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
FROM node:18-alpine
WORKDIR /app
# Install FFmpeg for video processing
RUN apk add --no-cache ffmpeg
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY tsconfig.json ./
COPY src ./src
# Build application
RUN npm run build
# Remove dev dependencies
RUN npm prune --production
# Create directories for data and logs
RUN mkdir -p data logs temp/videos output/clips output/shorts output/thumbnails
# Expose port
EXPOSE 3000
# Set NODE_ENV to production
ENV NODE_ENV=production
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/health', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"
# Start application
CMD ["npm", "start"]