Initial commit

This commit is contained in:
twotalesanimation
2026-06-11 10:46:09 +02:00
commit 81ad7e4ea9
223 changed files with 39530 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
# syntax=docker/dockerfile:1
# ---------------------------------------------------------------------------
# Stage 1 Build TypeScript
# ---------------------------------------------------------------------------
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY tsconfig.json ./
COPY src/ ./src/
RUN npm run build
# ---------------------------------------------------------------------------
# Stage 2 Runtime image
# ---------------------------------------------------------------------------
FROM node:20-alpine AS runner
# Install FFmpeg (includes ffprobe).
RUN apk add --no-cache ffmpeg
WORKDIR /app
# Production dependencies only.
COPY package*.json ./
RUN npm install --omit=dev
# Compiled output from builder stage.
COPY --from=builder /app/dist ./dist
# Non-root user for defence-in-depth.
RUN addgroup -g 1001 -S transcoder \
&& adduser -u 1001 -S transcoder -G transcoder
# Work directory the worker uses for temp files.
RUN mkdir -p /work && chown transcoder:transcoder /work
USER transcoder
CMD ["npm", "run", "start"]