From 4c0fde6415f9c12b51c810ad710b5d9ae9aa15d5 Mon Sep 17 00:00:00 2001 From: TheMaddax Date: Mon, 9 Dec 2024 18:41:11 -0600 Subject: [PATCH] Copy all source first --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index ec6f79c..da86f8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ FROM node:20-alpine AS base RUN corepack enable && corepack prepare pnpm@latest --activate WORKDIR /app -# Copy package files -COPY package.json pnpm-lock.yaml* ./ +# Copy all source files first +COPY . . # Install dependencies FROM base AS deps @@ -12,15 +12,13 @@ RUN pnpm install --frozen-lockfile # Build the app FROM base AS builder COPY --from=deps /app/node_modules ./node_modules -COPY . . RUN pnpm build # Production image FROM nginx:alpine AS runner -# Copy built app +# Copy built app and static assets COPY --from=builder /app/dist /usr/share/nginx/html -# Copy static assets from the builder stage COPY --from=builder /app/public/images /usr/share/nginx/html/images COPY --from=builder /app/public/subtitles /usr/share/nginx/html/subtitles COPY --from=builder /app/public/transcriptions /usr/share/nginx/html/transcriptions