diff --git a/Dockerfile b/Dockerfile index c990d4e..1f3616d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,8 @@ FROM python AS sphinx_build WORKDIR /app COPY --from=composer /app /app RUN pip3 install Sphinx sphinx_rtd_theme -RUN make html +ARG language=en +RUN make -e "SPHINXOPTS=-D language='${language}'" html FROM nginx WORKDIR /usr/share/nginx/html diff --git a/README.md b/README.md index 132a10a..6b17da2 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,13 @@ $ docker-compose up --build Go to [http://localhost:8080/](http://localhost:8080/) to read the generated documentation. +If you want to localize your documentation you can pass the locale as an argument to the docker build: + +```bash +$ docker-compose build --build-arg language=de +$ docker-compose up +``` + ## Patterns The patterns can be structured in roughly three different categories. Please click on the [:notebook:](http://en.wikipedia.org/wiki/Software_design_pattern) for a full explanation of the pattern on Wikipedia. diff --git a/docker-compose.yml b/docker-compose.yml index 7c02d5a..aa8819f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,5 +4,7 @@ services: build: context: . dockerfile: Dockerfile + args: + language: ${language:-en} ports: - "8080:80"