Feat: Local prod proxy
This commit is contained in:
27
Proxy/Local/Dockerfile
Normal file
27
Proxy/Local/Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
|
||||
FROM node:22-alpine AS frontend-dependencies
|
||||
|
||||
WORKDIR /workspace/Frontend
|
||||
|
||||
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
|
||||
|
||||
COPY Frontend/package.json Frontend/pnpm-lock.yaml Frontend/tsconfig.json Frontend/vite.config.ts ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
FROM frontend-dependencies AS frontend-build
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY Frontend/ ./
|
||||
|
||||
RUN pnpm build:static
|
||||
|
||||
FROM nginx:1.29-alpine AS production
|
||||
|
||||
COPY Proxy/Local/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=frontend-build /workspace/Frontend/dist/client /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user