18 lines
460 B
Docker
18 lines
460 B
Docker
# Pfad, unter dem die App ausgeliefert wird, z.B. /ue1
|
|
ARG BASE_PATH=/
|
|
|
|
FROM node:26-trixie-slim AS build
|
|
ARG BASE_PATH
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN BASE_PATH="$BASE_PATH" npm run build
|
|
|
|
FROM nginx:mainline-trixie
|
|
ARG BASE_PATH
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
# Willkommensseite des Images entfernen
|
|
RUN rm -rf /usr/share/nginx/html/*
|
|
COPY --from=build /app/dist /usr/share/nginx/html/${BASE_PATH}
|