-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (28 loc) · 941 Bytes
/
Dockerfile
File metadata and controls
43 lines (28 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM node:24.14.0-slim AS builder
WORKDIR /app
# Copy package files to install dependencies
COPY package*.json ./
COPY standalone/webapp/package*.json ./standalone/webapp/
COPY library/package*.json ./library/
# Install all workspace deps
RUN npm install
# Copy only necessary source files (no node_modules)
# Copy source files
COPY standalone/webapp ./standalone/webapp
COPY library ./library
# Also copy any global config used during build
# Build
ARG VITE_BACKEND_URL
ENV VITE_BACKEND_URL=$VITE_BACKEND_URL
ARG VITE_BACKEND_URL_WSS
ENV VITE_BACKEND_URL_WSS=$VITE_BACKEND_URL_WSS
RUN npm run build:lib && npm run build:webapp
# Serve with Nginx
FROM nginx:alpine
# Clean default content
RUN rm -rf /usr/share/nginx/html/*
# Copy only final build
COPY --from=builder /app/standalone/webapp/dist /usr/share/nginx/html
# Copy custom nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
CMD ["nginx", "-g", "daemon off;"]