mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2026-05-11 16:59:50 -05:00
6adbbca439
npm install --only=optional So that Vite can install dependancies it needs for multi Arch builds
26 lines
508 B
Docker
26 lines
508 B
Docker
FROM node:lts-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
COPY frontend/package*.json ./frontend/
|
|
|
|
RUN npm ci --ignore-scripts && \
|
|
npm install --only=optional
|
|
|
|
COPY frontend/ ./frontend/
|
|
|
|
RUN npm run build:frontend
|
|
|
|
FROM nginxinc/nginx-unprivileged:alpine
|
|
|
|
ENV BACKEND_HOST=backend \
|
|
BACKEND_PORT=3001
|
|
|
|
COPY --from=builder /app/frontend/dist /usr/share/nginx/html
|
|
COPY docker/nginx.conf.template /etc/nginx/templates/default.conf.template
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|