File tree Expand file tree Collapse file tree 3 files changed +13
-22
lines changed
Expand file tree Collapse file tree 3 files changed +13
-22
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ src/pip-delete-this-directory.txt
1313
1414TEST- * .xml
1515
16- tcvenv
17-
1816** /go.work
1917
2018# VS Code settings
Original file line number Diff line number Diff line change @@ -23,25 +23,20 @@ tidy-all:
2323
2424# # --------------------------------------
2525
26- TCENV =tcvenv
27- PYTHONBIN =./$(TCENV ) /bin
28-
29- tcvenv : tcvenv/touchfile
30-
31- tcvenv/touchfile :
32- @echo " Creating docs $( TCENV) ..."
33- test -d $(TCENV ) || python3 -m venv $(TCENV )
34- @echo " Installing requirements..."
35- . $(PYTHONBIN ) /activate; pip install -Ur requirements.txt
36- touch $(TCENV ) /touchfile
26+ DOCS_CONTAINER =mkdocs-container
27+ DOCS_IMAGE =python:3.8
3728
29+ .PHONY : clean-docs
3830clean-docs :
39- @echo " Destroying docs $( TCENV ) ... "
40- rm -rf $(TCENV )
31+ @echo " Destroying docs"
32+ docker rm -f $(DOCS_CONTAINER ) || true
4133
4234.PHONY : serve-docs
43- serve-docs : tcvenv
44- . $(PYTHONBIN ) /activate; $(PYTHONBIN ) /mkdocs serve
35+ serve-docs :
36+ docker run --rm --name $(DOCS_CONTAINER ) -it -p 8000:8000 \
37+ -v $(PWD ) :/testcontainers-go \
38+ -w /testcontainers-go \
39+ $(DOCS_IMAGE ) bash -c " pip install -Ur requirements.txt && mkdocs serve -f mkdocs.yml -a 0.0.0.0:8000"
4540
4641# # --------------------------------------
4742
Original file line number Diff line number Diff line change @@ -81,23 +81,21 @@ Please refer to the [codeinclude plugin documentation](https://github.com/rnorth
8181
8282### Previewing rendered content
8383
84- #### Using Python locally
85-
8684From the root directory of the repository, you can use the following command to build and serve the documentation locally:
8785
8886``` shell
8987make serve-docs
9088```
9189
92- It will use a Python's virtual environment to install the required dependencies and start a local server at ` http://localhost:8000 ` .
90+ It will use a Docker container to install the required dependencies and start a local server at ` http://localhost:8000 ` .
9391
94- Once finished, you can destroy the virtual environment with the following command:
92+ Once finished, you can destroy the container with the following command:
9593
9694``` shell
9795make clean-docs
9896```
9997
100- #### PR Preview deployments
98+ ### PR Preview deployments
10199
102100Note that documentation for pull requests will automatically be published by Netlify as 'deploy previews'.
103101These deployment previews can be accessed via the ` deploy/netlify ` check that appears for each pull request.
You can’t perform that action at this time.
0 commit comments