forked from okikio/mov-docs
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 712 Bytes
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 712 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
# Stage 1: Build
FROM node:24-alpine AS builder
WORKDIR /app
# Install pnpm
RUN corepack enable && corepack prepare pnpm@10.31.0 --activate
# Copy package files
COPY package.json pnpm-lock.yaml* ./
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy source
COPY . .
# Build-time configuration (override via docker-compose build.args or --build-arg)
ARG SITE_URL=https://okikio.github.io
ARG BASE_PATH=/mov-docs
ENV SITE_URL=${SITE_URL}
ENV BASE_PATH=${BASE_PATH}
# Build the site
RUN pnpm build
# Stage 2: Serve
FROM nginx:alpine-slim AS runtime
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]