mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-26 02:35:57 +02:00
fix the dockerfile of the frontend
This commit is contained in:
@@ -5,33 +5,28 @@ WORKDIR /app
|
||||
ARG VERSION
|
||||
ARG BASE_URL
|
||||
|
||||
# Copy package files first for better layer caching
|
||||
COPY package*.json ./
|
||||
RUN npm ci && npm cache clean --force
|
||||
|
||||
# Copy source code after dependencies are installed
|
||||
COPY . .
|
||||
RUN env PUBLIC_VERSION=${VERSION} BASE_URL=${BASE_URL} npm run build
|
||||
|
||||
FROM node:24-alpine AS frontend
|
||||
ARG VERSION
|
||||
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
WORKDIR /app
|
||||
|
||||
LABEL version=${VERSION}
|
||||
LABEL description="Docker image for the web frontend of MediaManager"
|
||||
|
||||
|
||||
ENV PUBLIC_VERSION=${VERSION}
|
||||
ENV PUBLIC_SSR_WEB=false
|
||||
|
||||
COPY --from=build /app/build ./build
|
||||
COPY --from=build /app/package*.json ./
|
||||
COPY --chmod=755 entrypoint.sh ./entrypoint.sh
|
||||
|
||||
RUN npm ci --only=production
|
||||
|
||||
CMD ["/app/entrypoint.sh"]
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
EXPOSE 3000
|
||||
USER node
|
||||
CMD ["node","build/index.js"]
|
||||
Reference in New Issue
Block a user