diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 20:22:09 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 20:22:09 +0100 |
| commit | 5a8dbc6347b3541e84fe669b22c17ad3b715e258 (patch) | |
| tree | b148c450939688caaaeb4adac6f2faa1eaffe649 /samples/test.dockerfile | |
| download | qwe-editor-5a8dbc6347b3541e84fe669b22c17ad3b715e258.tar.gz | |
Engage!
Diffstat (limited to 'samples/test.dockerfile')
| -rw-r--r-- | samples/test.dockerfile | 34 |
1 files changed, 34 insertions, 0 deletions
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;"] |
