-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (32 loc) · 1.05 KB
/
Dockerfile
File metadata and controls
44 lines (32 loc) · 1.05 KB
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
44
# =============================================================================
# MACROSTASIS FRONTEND - Dockerfile
# =============================================================================
# Multi-stage build for Angular SSR application
# Produces an optimized nginx container serving the static build
#
# @author Carlos Eduardo Juárez Ricardo
# @version 2.0.0
# =============================================================================
# Stage 1: Build
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY macrostasis/package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY macrostasis/ ./
# Build for production
RUN npm run build
# Stage 2: Production
FROM nginx:alpine AS production
# Copy custom nginx config
COPY nginx.conf /etc/nginx/nginx.conf
# Copy built files from builder
COPY --from=builder /app/dist/macrostasis/browser /usr/share/nginx/html
# Copy public assets (SVG icons)
COPY macrostasis/public/ /usr/share/nginx/html/
# Expose port 80
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]