build(docker): add Dockerfile with nginx for production deployment

This commit is contained in:
devcodetools committed 2026-09-13 18:18:08 +02:00
1 parent 8523ace11f
commit 8d6d923063
3 files changed
+49

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
FROM node:22-alpine AS build
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
RUN pnpm install --frozen-lockfile
COPY public ./public
COPY . .
RUN pnpm build
FROM nginx:1.27-alpine AS production
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]