-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (28 loc) · 798 Bytes
/
Copy pathDockerfile
File metadata and controls
41 lines (28 loc) · 798 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
39
40
41
FROM node:22-alpine AS base
# Install ffmpeg and python3 for pipeline dependencies
RUN apk add --no-cache ffmpeg python3 py3-pip
WORKDIR /app
# Install dependencies
COPY package.json package-lock.json ./
RUN npm ci
# Copy source
COPY . .
# Build Next.js
RUN npm run build
# Production image
FROM node:22-alpine AS runner
RUN apk add --no-cache ffmpeg python3 py3-pip
WORKDIR /app
ENV NODE_ENV=production
# Copy built app
COPY --from=base /app/.next ./.next
COPY --from=base /app/node_modules ./node_modules
COPY --from=base /app/package.json ./package.json
COPY --from=base /app/src ./src
COPY --from=base /app/scripts ./scripts
COPY --from=base /app/assets ./assets
COPY --from=base /app/public ./public
# Create runs directory
RUN mkdir -p /app/runs
EXPOSE 3001
CMD ["npm", "start"]