Dockerfile
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -1,5 +1,5 @@
|
|||||||
# --- Build stage ---
|
# --- Build stage ---
|
||||||
FROM node:22 AS build
|
FROM node:22-bullseye AS build
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV ORIGIN=https://tatort.innovation-hub-niedersachsen.de
|
ENV ORIGIN=https://tatort.innovation-hub-niedersachsen.de
|
||||||
ENV PNPM_HOME="/usr/local/lib/node_modules/pnpm"
|
ENV PNPM_HOME="/usr/local/lib/node_modules/pnpm"
|
||||||
@@ -23,8 +23,12 @@ COPY . ./
|
|||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
|
|
||||||
# --- Production stage ---
|
# --- Production stage ---
|
||||||
FROM node:22-alpine3.20
|
FROM node:22-bullseye AS production
|
||||||
COPY --from=build /usr/src/app .
|
WORKDIR /usr/src/app
|
||||||
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
RUN pnpm install --production
|
||||||
|
|
||||||
|
COPY --from=build /usr/src/appi/dist ./dist
|
||||||
ENV HOST=0.0.0.0
|
ENV HOST=0.0.0.0
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user