From 902f148b96b1a5a175957871e0a6f783506d9b2f Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 25 Sep 2025 16:33:19 +0200 Subject: [PATCH 1/5] Dockerized launching mkdocs server --- Dockerfile | 5 +++++ compose.yaml | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Dockerfile create mode 100644 compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..aa53994f98 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3-slim +COPY ./. /docs/ +WORKDIR /docs/ +RUN pip install -r requirements.txt +CMD ["mkdocs", "serve", "--dev-addr", "0.0.0.0:8888"] diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000000..bcf05ef331 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,10 @@ +services: + mkdocs: + build: . + environment: + - MKDOCS_PORT=8000 + ports: + - "${MKDOCS_PORT}:${MKDOCS_PORT}" + volumes: + - .:/docs + command: mkdocs serve --dev-addr=0.0.0.0:${MKDOCS_PORT} From f226d957a085808f239606d655b05d2368e416e3 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 29 Sep 2025 14:02:31 +0200 Subject: [PATCH 2/5] Delegated ability of changing external mkdocs port to compose only --- Dockerfile | 2 +- compose.yaml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa53994f98..a7c84477fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,4 @@ FROM python:3-slim COPY ./. /docs/ WORKDIR /docs/ RUN pip install -r requirements.txt -CMD ["mkdocs", "serve", "--dev-addr", "0.0.0.0:8888"] +CMD ["mkdocs", "serve", "--dev-addr", "0.0.0.0:8000"] diff --git a/compose.yaml b/compose.yaml index bcf05ef331..0df0b0477c 100644 --- a/compose.yaml +++ b/compose.yaml @@ -4,7 +4,6 @@ services: environment: - MKDOCS_PORT=8000 ports: - - "${MKDOCS_PORT}:${MKDOCS_PORT}" + - "${MKDOCS_PORT}:8000" volumes: - .:/docs - command: mkdocs serve --dev-addr=0.0.0.0:${MKDOCS_PORT} From 7fa9c55260df4c95d158ec21789567b7e8ff6d60 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 29 Sep 2025 14:06:07 +0200 Subject: [PATCH 3/5] Fixed tab size in compose.yaml --- compose.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compose.yaml b/compose.yaml index 0df0b0477c..6bb90a4e18 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,9 +1,9 @@ services: mkdocs: - build: . - environment: - - MKDOCS_PORT=8000 - ports: - - "${MKDOCS_PORT}:8000" - volumes: - - .:/docs + build: . + environment: + - MKDOCS_PORT=8000 + ports: + - "${MKDOCS_PORT}:8000" + volumes: + - .:/docs \ No newline at end of file From 8f68edb0ed2d4753d76e63ac51b55fff1564630d Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 29 Sep 2025 16:37:34 +0200 Subject: [PATCH 4/5] Confgured watching for changes during development --- Dockerfile | 2 +- compose.yaml | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7c84477fd..e06afdce1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,4 @@ FROM python:3-slim COPY ./. /docs/ WORKDIR /docs/ RUN pip install -r requirements.txt -CMD ["mkdocs", "serve", "--dev-addr", "0.0.0.0:8000"] +CMD ["mkdocs", "serve", "--dev-addr", "0.0.0.0:8000", "--dirty"] diff --git a/compose.yaml b/compose.yaml index 6bb90a4e18..dfb9947384 100644 --- a/compose.yaml +++ b/compose.yaml @@ -6,4 +6,11 @@ services: ports: - "${MKDOCS_PORT}:8000" volumes: - - .:/docs \ No newline at end of file + - .:/docs + develop: + watch: + - + action: restart + path: ./docs + target: /docs + initial_sync: true From f5a7a418f7f09f017f3bd1b4872eba08cf383ae7 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 29 Sep 2025 17:31:52 +0200 Subject: [PATCH 5/5] Added .env file --- .env | 1 + 1 file changed, 1 insertion(+) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000000..341561801a --- /dev/null +++ b/.env @@ -0,0 +1 @@ +MKDOCS_PORT=8000