/docs-developer-env

Easy to deploy developer environment, for writing/testing guides & documentations for docs.ovh.com

Primary LanguageShellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

OVH Docs : Developer environment

Easy to deploy developer environment, for writing/testing guides & documentations for docs.ovh.com

With Docker

Prerequisite

Build script

Show help

./build.sh -h

> build.sh [-h] [-f folder] [-p port] build and start docs.ovh.com in a docker container
>
> where:
>    -h  show this help
>    -f  set the docs repo path to build (default: current directory)
>    -p  set the exposed docker port (default: 8080)

Start the build

./build.sh -f /path/to/docs

Next, go to http:///localhost:8080/fr/

Steps (Manual)

First, build the docker image

git clone https://github.com/ovh/docs-developer-env.git
cd docs-developer-env
docker build -t ovh-docs-dev-env .

Second, run docker container

# get the ovh docs repository
git clone https://github.com/ovh/docs.git
cd docs
# run the container and mount volume "pages" (change the port to suit your needs, here XXXXX)
# the port 8080 is the exposed one, so don't change it
docker run --rm -v $(pwd)/pages:/src/docs/pages -d --name ovh-docs-dev-env -p XXXXX:8080 ovh-docs-dev-env

Note : the pelican build, started in debug mode, takes 1 or 2 minutes to complete.

Check the logs.

docker logs -f ovh-docs-dev-env

When the build is complete, go to http://localhost:XXXXX/fr/ and check your works.

Third, stop the container

docker stop ovh-docs-dev-env

Without Docker

Prerequesite

  • Python 3 installed

First launch

After cloning this project, you need to initialize your environment

./generate-doc.sh init /path/to/ovh-docs

The generator checks out the docs-rendering Git project on src/docs directory, creates output folder and link to pages directory on your ovh-docs project. It launches the pip install command to install requirements like Pelican. And then, it calls the entrypoint.sh script.

Next launch

./generate-doc.sh launch

The generator checks src/docs exists and calls the entrypoint.sh script.