prepare an image to build the doc

This commit is contained in:
julienfastre committed 2025-06-30 16:25:59 +02:00
1 parent 96a7cbe954
commit e769a9dd70
5 files changed
+29 -2

No files matched your search

+21 -1
View File
@@ -1,3 +1,23 @@
# -------- Stage 1: Build the documentation using mkdocs --------
FROM python:3.13-slim AS builder
WORKDIR /build
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY user/ user/
COPY admin/ admin/
RUN ls
RUN cd user && mkdocs build --clean && cd ..
RUN cd admin && mkdocs build --clean && cd ..
# -------- Stage 2: Serve the built documentation with nginx --------
FROM nginx:alpine
LABEL authors="Julien Fastré"
# Copy the built site from the builder stage
COPY --from=builder /build/admin/site /usr/share/nginx/html/admin
COPY --from=builder /build/user/site /usr/share/nginx/html/user