mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
29 lines
627 B
Docker
29 lines
627 B
Docker
FROM node:18-alpine AS builder
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm ci
|
|
|
|
# Copy source (includes static/openapi.json if pre-fetched)
|
|
COPY . .
|
|
|
|
# Fix docusaurus config: change onBrokenLinks to 'warn' for Docker build
|
|
RUN sed -i "s/onBrokenLinks: 'throw'/onBrokenLinks: 'warn'/g" docusaurus.config.ts
|
|
|
|
# Build static site (skip prebuild hook by calling docusaurus directly)
|
|
RUN npx docusaurus build
|
|
|
|
# Production image
|
|
FROM nginx:alpine
|
|
|
|
# Copy built static files
|
|
COPY --from=builder /app/build /usr/share/nginx/html
|
|
|
|
# Expose port
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|