From 5a8dbc6347b3541e84fe669b22c17ad3b715e258 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Wed, 21 Jan 2026 20:22:09 +0100 Subject: Engage! --- samples/test.dockerfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 samples/test.dockerfile (limited to 'samples/test.dockerfile') diff --git a/samples/test.dockerfile b/samples/test.dockerfile new file mode 100644 index 0000000..28f71fd --- /dev/null +++ b/samples/test.dockerfile @@ -0,0 +1,34 @@ +# -------------------- +# Build stage +# -------------------- +FROM node:20-alpine AS build + +# Set working directory +WORKDIR /app + +# Copy dependency files first (better caching) +COPY package.json package-lock.json ./ + +# Install dependencies +RUN npm ci + +# Copy the rest of the source code +COPY . . + +# Build the app +RUN npm run build + + +# -------------------- +# Production stage +# -------------------- +FROM nginx:alpine + +# Copy built files from build stage +COPY --from=build /app/dist /usr/share/nginx/html + +# Expose port 80 +EXPOSE 80 + +# Start nginx +CMD ["nginx", "-g", "daemon off;"] -- cgit v1.2.3