add builder
This commit is contained in:
parent
da49f378c6
commit
545b49b65f
1 changed files with 5 additions and 10 deletions
15
Dockerfile
15
Dockerfile
|
|
@ -2,12 +2,6 @@ FROM node:20-alpine AS base
|
||||||
RUN corepack enable && corepack prepare pnpm@latest --activate
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Create required directories
|
|
||||||
RUN mkdir -p /app/public/images/thumbnails \
|
|
||||||
/app/public/videos \
|
|
||||||
/app/public/subtitles \
|
|
||||||
/app/public/transcriptions
|
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files
|
||||||
COPY package.json pnpm-lock.yaml* ./
|
COPY package.json pnpm-lock.yaml* ./
|
||||||
|
|
||||||
|
|
@ -24,11 +18,12 @@ RUN pnpm build
|
||||||
# Production image
|
# Production image
|
||||||
FROM nginx:alpine AS runner
|
FROM nginx:alpine AS runner
|
||||||
|
|
||||||
# Copy built app and static assets
|
# Copy built app
|
||||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
COPY public/images /usr/share/nginx/html/images
|
# Copy static assets from the builder stage
|
||||||
COPY public/subtitles /usr/share/nginx/html/subtitles
|
COPY --from=builder /app/public/images /usr/share/nginx/html/images
|
||||||
COPY public/transcriptions /usr/share/nginx/html/transcriptions
|
COPY --from=builder /app/public/subtitles /usr/share/nginx/html/subtitles
|
||||||
|
COPY --from=builder /app/public/transcriptions /usr/share/nginx/html/transcriptions
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
# Create videos directory for volume mount
|
# Create videos directory for volume mount
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue