-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdockerfile
More file actions
35 lines (24 loc) · 801 Bytes
/
dockerfile
File metadata and controls
35 lines (24 loc) · 801 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
# Dockerfile for MiniFy Docs
# Designed to work when build context is the monorepo root
# Build: docker build -f apps/docs/dockerfile -t minify-docs .
FROM node:25-alpine AS builder
WORKDIR /app
# Copy only docs package.json from monorepo
COPY apps/docs/package.json ./
# Install dependencies using npm
RUN npm install
# Copy docs source files
COPY apps/docs/src ./src
COPY apps/docs/astro.config.mjs ./
COPY apps/docs/tsconfig.json ./
COPY apps/docs/nginx.conf ./
# Build the docs
RUN npm run build
# Production image with nginx
FROM nginx:alpine AS runner
# Copy built assets from builder
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy nginx config from builder
COPY --from=builder /app/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 3002
CMD ["nginx", "-g", "daemon off;"]