From 46180110017a30bd11efa73bdf9adec28946e494 Mon Sep 17 00:00:00 2001 From: Lubos Mjachky Date: Mon, 19 Aug 2024 13:26:13 +0200 Subject: [PATCH] Update the docs building procedure [noissue] --- .github/workflows/ci.yaml | 1 - README.md | 11 ++--------- base/compose.yaml | 3 --- client/oci_env/utils.py | 4 ---- compose.env.example | 1 - staging_docs/dev/guides/create-multiple-envs.md | 1 - 6 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8ad8417..567b59d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -67,7 +67,6 @@ jobs: cp oci_env/.github/assets/${TEST}_compose.env oci_env/compose.env cp oci_env/.github/assets/${TEST}_compose.env ${PWD}/custom.env echo "API_PORT=7210" >> ${PWD}/custom.env - echo "DOCS_PORT=12346" >> ${PWD}/custom.env echo "COMPOSE_PROJECT_NAME=my_2nd_project" >> ${PWD}/custom.env echo "SECOND_SERVICE_PORT=7002" >> ${PWD}/custom.env diff --git a/README.md b/README.md index 387354c..08f7235 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,6 @@ DEV_SOURCE_PATH=pulpcore # These three values must be different from the api port, docs port and project name for any other # instances of the environment that are running to avoid conflicts. API_PORT=4002 -DOCS_PORT=12346 COMPOSE_PROJECT_NAME=test # If you want to use a different directory for your git checkouts you can set this @@ -205,15 +204,9 @@ address for the publicly facing network interface on the host. #### Building docs -First, navigate to `/src/{plugin}/docs` in the container and do the following: -``` -pip3 install -r ../doc_requirements.txt -make clean && make diagrams && make html -python3 -m http.server ${DOCS_PORT} -``` - -Then, visit `0.0.0.0:${DOCS_PORT}` in a web browser to preview the documentation. +Install the docs building utility from https://github.com/pulp/pulp-docs. +Then, run `make docs` and `make servedocs`. ### Unit diff --git a/base/compose.yaml b/base/compose.yaml index cb0b641..6bc0376 100644 --- a/base/compose.yaml +++ b/base/compose.yaml @@ -23,8 +23,6 @@ services: - "API_HOST={API_HOST}" - "API_PORT={API_PORT}" - "API_PROTOCOL={API_PROTOCOL}" - - "DOCS_PORT={DOCS_PORT}" - - "NGINX_DOCS_PORT={NGINX_DOCS_PORT}" - "REMOTE_FIXTURES_ORIGIN={REMOTE_FIXTURES_ORIGIN}" - "NGINX_PORT={NGINX_PORT}" - "NGINX_SSL_PORT={NGINX_SSL_PORT}" @@ -33,7 +31,6 @@ services: ports: - "{API_PORT}:{NGINX_PORT}" - - "{DOCS_PORT}:{NGINX_DOCS_PORT}" depends_on: - _base volumes: diff --git a/client/oci_env/utils.py b/client/oci_env/utils.py index 2227002..d9c9eca 100644 --- a/client/oci_env/utils.py +++ b/client/oci_env/utils.py @@ -100,10 +100,6 @@ def get_config(env_file): "API_HOST": "localhost", "API_PORT": "5001", - # A port dedicated for exposing generated docs - "DOCS_PORT": "12345", - "NGINX_DOCS_PORT": user_preferences.get("DOCS_PORT", "12345"), - # nginx port to run in the container. This defaults to 5001 if nothing is set or # the value of API_HOST if that is set. "NGINX_PORT": user_preferences.get("API_PORT", "5001"), diff --git a/compose.env.example b/compose.env.example index 745878d..cf7cf23 100644 --- a/compose.env.example +++ b/compose.env.example @@ -18,4 +18,3 @@ DEV_SOURCE_PATH= # API_HOST=localhost # API_PORT=5001 # API_PROTOCOL=http -# DOCS_PORT=12345 diff --git a/staging_docs/dev/guides/create-multiple-envs.md b/staging_docs/dev/guides/create-multiple-envs.md index 960262d..6d1c74e 100644 --- a/staging_docs/dev/guides/create-multiple-envs.md +++ b/staging_docs/dev/guides/create-multiple-envs.md @@ -14,7 +14,6 @@ DEV_SOURCE_PATH=pulpcore # These three values must be different from the api port, docs port and project name for any other # instances of the environment that are running to avoid conflicts. API_PORT=4002 -DOCS_PORT=12346 COMPOSE_PROJECT_NAME=test # If you want to use a different directory for your git checkouts you can set this