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
13
13
14
14
TEST- * .xml
15
15
16
- tcvenv
17
-
18
16
** /go.work
19
17
20
18
# VS Code settings
Original file line number Diff line number Diff line change @@ -23,25 +23,20 @@ tidy-all:
23
23
24
24
# # --------------------------------------
25
25
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
37
28
29
+ .PHONY : clean-docs
38
30
clean-docs :
39
- @echo " Destroying docs $( TCENV ) ... "
40
- rm -rf $(TCENV )
31
+ @echo " Destroying docs"
32
+ docker rm -f $(DOCS_CONTAINER ) || true
41
33
42
34
.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"
45
40
46
41
# # --------------------------------------
47
42
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
81
81
82
82
### Previewing rendered content
83
83
84
- #### Using Python locally
85
-
86
84
From the root directory of the repository, you can use the following command to build and serve the documentation locally:
87
85
88
86
``` shell
89
87
make serve-docs
90
88
```
91
89
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 ` .
93
91
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:
95
93
96
94
``` shell
97
95
make clean-docs
98
96
```
99
97
100
- #### PR Preview deployments
98
+ ### PR Preview deployments
101
99
102
100
Note that documentation for pull requests will automatically be published by Netlify as 'deploy previews'.
103
101
These 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