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
+52
View File
@@ -0,0 +1,52 @@
# ==============================
# Build stage
# ==============================
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files and Prisma schema FIRST
COPY transcoder/package.json transcoder/tsconfig.json ./
COPY prisma ./prisma
# Set a temporary DATABASE_URL for Prisma schema generation during build
ENV DATABASE_URL="postgresql://user:password@localhost:5432/dummy"
# Install all deps (including dev)
RUN npm install
# Copy source
COPY transcoder ./
# Build TypeScript
RUN npm run build
# ==============================
# Runtime stage
# ==============================
FROM node:20-alpine
# Install FFmpeg
RUN apk add --no-cache ffmpeg
WORKDIR /app
# Copy package files
COPY transcoder/package.json ./
# Copy node_modules from builder (includes all dependencies)
COPY --from=builder /app/node_modules ./node_modules
# Copy compiled output
COPY --from=builder /app/dist ./dist
# Copy Prisma schema
COPY prisma ./prisma
# Environment defaults (can be overridden)
ENV NODE_ENV=production
ENV UPLOADS_DIR=/uploads
# The container runs once and exits
CMD ["node", "dist/index.js"]