From ebff9928162bf9ea7a938e9595402b82da5e2e30 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 11:50:37 +0000 Subject: [PATCH] Add docker/Dockerfile --- docker/Dockerfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..ed8bccc2 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,29 @@ +## ----- Stage 1: Build Angular SSR App ----- +FROM node:22-alpine AS build +WORKDIR /app + +# Copy package files +COPY package.json package-lock.json ./ + +# Install dependencies +RUN npm ci + +# Copy the rest of the code +COPY . . + +# Build the Angular app for production +RUN npm run build + +# ----- Stage 2: Serve SSR App ----- +FROM node:22-alpine AS final + +WORKDIR /app + +# Copy the built assets from the build stage. +COPY --from=build /app/preview ./preview + +# Expose the standard Angular SSR port +EXPOSE 4000 + +# Start the Node.js SSR server +CMD ["node", "preview/server/server.mjs"] \ No newline at end of file