This commit is contained in:
Andrey Kondratev
2025-11-10 13:56:19 +05:00
parent 6db48b16a7
commit 82a9596370
13 changed files with 1086 additions and 152 deletions

View File

@@ -3,15 +3,20 @@ FROM node:18-alpine AS builder
WORKDIR /app
# Copy package files
# Copy package files first (better caching)
COPY package*.json ./
COPY yarn.lock* ./
# Install all dependencies (including dev for build)
# This layer will be cached unless package.json changes
RUN yarn install --frozen-lockfile && yarn cache clean
# Copy source code
COPY . .
# Copy source code (separate from dependencies)
COPY tsconfig*.json ./
COPY eslint.config.mjs ./
COPY scripts ./scripts
COPY src ./src
COPY public ./public
# Build the application with minification
RUN yarn build:prod
@@ -28,6 +33,7 @@ RUN apk update && apk add --no-cache ffmpeg
# Set ffmpeg paths
ENV FFMPEG_PATH=/usr/bin/ffmpeg
ENV FFPROBE_PATH=/usr/bin/ffprobe
ENV NODE_ENV=production
WORKDIR /app