diff --git a/web/Dockerfile b/web/Dockerfile index b80a0dc..2df98cc 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -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"] \ No newline at end of file diff --git a/web/entrypoint.sh b/web/entrypoint.sh deleted file mode 100644 index 0acf8d1..0000000 --- a/web/entrypoint.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# This script is used to start the MediaManager frontend service. - - -# text created with https://patorjk.com/software/taag/ font: Slanted -cat << EOF - __ ___ ___ __ ___ ______ __ __ - / |/ /__ ____/ (_)___ _/ |/ /___ _____ ____ _____ ____ _____ / ____/________ ____ / /____ ____ ____/ / - / /|_/ / _ \/ __ / / __ \`/ /|_/ / __ \`/ __ \/ __ \`/ __ \`/ _ \/ ___/ / /_ / ___/ __ \/ __ \/ __/ _ \/ __ \/ __ / - / / / / __/ /_/ / / /_/ / / / / /_/ / / / / /_/ / /_/ / __/ / / __/ / / / /_/ / / / / /_/ __/ / / / /_/ / -/_/ /_/\___/\__,_/_/\__,_/_/ /_/\__,_/_/ /_/\__,_/\__, /\___/_/ /_/ /_/ \____/_/ /_/\__/\___/_/ /_/\__,_/ - /____/ -EOF -echo "Buy me a coffee at https://buymeacoffee.com/maxdorninger" -echo "Starting MediaManager frontend service..." -node build/index.js