mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-04-30 03:37:55 +02:00
Allow to configure locale for docker builds
This commit is contained in:
parent
cddf16874e
commit
2e62e7781c
@ -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
|
||||
|
@ -39,6 +39,13 @@ $ docker-compose up --build
|
||||
|
||||
Go to [http://localhost:8080/README.html](http://localhost:8080/README.html) 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.
|
||||
|
@ -4,5 +4,7 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
language: ${language:-en}
|
||||
ports:
|
||||
- "8080:80"
|
||||
|
Loading…
x
Reference in New Issue
Block a user