Skip to content

Commit 291f81b

Browse files
committed
Merge branch 'feature/mkdocforge-setup-docker' into develop
2 parents a976c9d + 1071097 commit 291f81b

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

Dockerfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# 🐳 MkDocForge Dockerfile
2+
3+
# Stage 1: Build Doxygen
4+
FROM python:3.11-slim-bullseye AS doxygen-builder
5+
6+
RUN apt-get update && apt-get install -y --no-install-recommends \
7+
build-essential \
8+
cmake \
9+
flex \
10+
bison \
11+
git \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
WORKDIR /doxygen
15+
RUN git clone https://github.com/doxygen/doxygen.git . && \
16+
mkdir build && \
17+
cd build && \
18+
cmake -G "Unix Makefiles" .. && \
19+
make && \
20+
make install
21+
22+
# Stage 2: Build MkDocForge
23+
FROM python:3.11-slim-bullseye
24+
25+
# Set environment variables
26+
ENV PYTHONDONTWRITEBYTECODE=1 \
27+
PYTHONUNBUFFERED=1 \
28+
PIP_NO_CACHE_DIR=1
29+
30+
31+
# Copy Doxygen from builder
32+
COPY --from=doxygen-builder /usr/local/bin/doxygen /usr/local/bin/doxygen
33+
34+
# Install system dependencies
35+
RUN apt-get update && apt-get install -y --no-install-recommends \
36+
build-essential \
37+
graphviz \
38+
&& rm -rf /var/lib/apt/lists/*
39+
40+
# Install pip and uv
41+
RUN pip install -U pip && pip install uv
42+
43+
# Set work directory
44+
WORKDIR /app
45+
46+
# Copy project files
47+
COPY pyproject.toml .
48+
49+
# Install project docs's dependencies
50+
RUN uv pip install --no-cache --system -e .[docs]
51+
52+
# Verify Doxygen installation
53+
RUN doxygen --version
54+
55+
EXPOSE 8000
56+
57+
# Start MkDocs server
58+
CMD ["uv", "run", "mkdocs", "serve", "--dev-addr=0.0.0.0:8000"]

docker-compose.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: 'mkdocforge'
3+
4+
services:
5+
mkdocforge:
6+
container_name: mkdocforge
7+
image: mkdocforge:v1
8+
restart: always
9+
build:
10+
context: .
11+
dockerfile: Dockerfile
12+
ports:
13+
- '8000:8000'
14+
volumes:
15+
- .:/app
16+
environment:
17+
- PYTHONUNBUFFERED=1
18+
command: mkdocs serve --dev-addr=0.0.0.0:8000

0 commit comments

Comments
 (0)