added dockerfile for docs

This commit is contained in:
PxlLoewe
2025-06-24 20:07:54 -07:00
parent 0607b93ade
commit f8389383f8
8 changed files with 105 additions and 31 deletions

2
apps/docs/.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
node_modules
dist

32
apps/docs/Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
# --- Build stage ---
FROM node:24-alpine3.21 AS builder
# Consider using the latest patch version for security updates
RUN apk update && apk upgrade
# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
RUN apk add --no-cache git
# Set workdir
WORKDIR /app
# Copy project files
COPY ./apps/docs .
# Install dependencies
RUN pnpm install
# Build VitePress site
RUN pnpm build
# --- Serve stage ---
FROM nginx:alpine
# Copy built site to nginx public folder
COPY --from=builder /app/.vitepress/dist /usr/share/nginx/html
# Expose port
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]