-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (23 loc) · 699 Bytes
/
Dockerfile
File metadata and controls
36 lines (23 loc) · 699 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
# Stage 1: Build
FROM node:25.8.1-alpine AS builder
WORKDIR /app
ENV NODE_ENV=production
# Install application dependencies
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
# Copy application source
COPY . .
# Stage 2: Final image
FROM node:25.8.1-alpine
WORKDIR /app
ENV NODE_ENV=production
# Install system dependencies
RUN apk add --no-cache ffmpeg
RUN addgroup -S nodeuser && adduser -S nodeuser -G nodeuser
# Copy only necessary files from the builder stage
COPY --from=builder /app /app
# Ensure all files and database directory are owned by nodeuser
RUN mkdir -p /app/database \
&& chown -R nodeuser:nodeuser /app
USER nodeuser
ENTRYPOINT ["./docker.startup.sh"]