From e769a9dd70b2aed03cd26c2996b1087fa42fa100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 30 Jun 2025 16:25:59 +0200 Subject: [PATCH] prepare an image to build the doc --- Dockerfile | 24 ++++++++++++++++++++++-- admin/docs/index.md | 3 +++ admin/mkdocs.yml | 2 +- user/.gitignore | 1 + user/docs/index.md | 3 +++ 5 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 admin/docs/index.md create mode 100644 user/docs/index.md diff --git a/Dockerfile b/Dockerfile index 572467b..0546032 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,23 @@ -FROM nginx:alpine -LABEL authors="Julien Fastré" +# -------- 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 + +# 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 diff --git a/admin/docs/index.md b/admin/docs/index.md new file mode 100644 index 0000000..6ad3d35 --- /dev/null +++ b/admin/docs/index.md @@ -0,0 +1,3 @@ +# Documentation administrateur + +En construction. \ No newline at end of file diff --git a/admin/mkdocs.yml b/admin/mkdocs.yml index daa1e96..a0e1670 100644 --- a/admin/mkdocs.yml +++ b/admin/mkdocs.yml @@ -1,6 +1,6 @@ --- site_name: "Manuel admnistrateur Chill" -site_url: https://manuel.chill.social/administrateur/ +site_url: https://manuel.chill.social/admin repo_url: https://gitea.champs-libres.be/Chill-project/manuals repo_name: Chill-project/manuals theme: diff --git a/user/.gitignore b/user/.gitignore index 913aeb2..8a54411 100644 --- a/user/.gitignore +++ b/user/.gitignore @@ -1 +1,2 @@ site/* + diff --git a/user/docs/index.md b/user/docs/index.md new file mode 100644 index 0000000..4cdad11 --- /dev/null +++ b/user/docs/index.md @@ -0,0 +1,3 @@ +Documentation utilisateur de chill + +En construction. \ No newline at end of file