@@ -61,6 +61,19 @@ These json files are generated examples from the python `ssvc` module.
6161
6262These files are used by the ` ssvc-calc ` module.
6363
64+ ## ` /docker/* `
65+
66+ The ` docker ` directory contains Dockerfiles and related configurations for to
67+ create images that can run the SSVC documentation site and unit tests.
68+
69+ Example:
70+
71+ ``` bash
72+ cd docker
73+ docker-compose up test
74+ docker-compose up docs
75+ ```
76+
6477## ` /src/* `
6578
6679This directory holds helper scripts that can make managing or using SSVC easier.
@@ -103,75 +116,30 @@ To preview any `make` command without actually executing it, run:
103116make -n < command>
104117```
105118
106- ### Run Local Server With Docker
107-
108- The easiest way to get started is using make to build a docker image and run the site:
109-
110- ``` bash
111- make docs
112- ```
113-
114- Then navigate to < http://localhost:8765/SSVC/ > to see the site.
115-
116- Note that the docker container will display a message with the URL to visit, for
117- example: ` Serving on http://0.0.0.0:8000/SSVC/ ` in the output. However, that port
118- is only available inside the container. The host port 8765 is mapped to the container's
119- port 8000, so you should navigate to < http://localhost:8765/SSVC/ > to see the site.
119+ ### Run Local Docs Server
120120
121- Or, if make is not available:
121+ The easiest way to get started is using make to build a docker image and run the site. However, we provide a few other options below.
122122
123- ``` bash
124- docker build --target docs --tag ssvc_docs .
125- docker run --tty --rm -p 8765:8000 --volume .:/app ssvc_docs
126- ```
123+ | Environment | Command |
124+ | -------------| ---------|
125+ | Make, Docker | ` make docs ` |
126+ | ~~ Make~~ , Docker | ` cd docker && docker-compose up docs ` |
127+ | ~~ Make~~ , ~~ Docker~~ | ` mkdocs serve ` |
127128
128- ### Run Local Server Without Docker
129-
130- If you prefer to run the site locally without Docker, you can do so with mkdocs.
131- We recommend using a virtual environment to manage dependencies:
132-
133- ``` bash
134- python3 -m venv ssvc_venv
135- pip install -r requirements.txt
136- ```
137-
138- Start a local server:
139-
140- ``` bash
141- mkdocs serve
142- ```
143-
144- By default, the server will run on port 8001.
145- This is configured in the ` mkdocs.yml ` file.
146- Navigate to < http://localhost:8001/ > to see the site.
147-
148- (Hint: You can use the ` --dev-addr ` argument with mkdocs to change the port, e.g. ` mkdocs serve --dev-addr localhost:8000 ` )
129+ Then navigate to < http://localhost:8000/SSVC/ > to see the site.
149130
150131## Run tests
151132
152133We include a few tests for the ` ssvc ` module.
134+ Options for running the test suite are provided below.
153135
154- ### Run Tests With Docker
155-
156- The easiest way to run tests is using make to build a docker image and run the tests:
136+ | Environment | Command | Comment |
137+ | -------------| ---------| ---------|
138+ | Make, Docker | ` make docker_test ` | runs in docker container |
139+ | ~~ Make~~ , Docker | ` cd docker && docker-compose run -rm test ` | runs in docker container |
140+ | Make, ~~ Docker~~ | ` make test ` | runs in host OS |
141+ | ~~ Make~~ , ~~ Docker~~ | ` pytest src/test ` | runs in host OS |
157142
158- ``` bash
159- make docker_test
160- ```
161-
162- Or, if make is not available:
163-
164- ``` bash
165- docker build --target test --tag ssvc_test .
166- docker run --tty --rm --volume .:/app ssvc_test
167- ```
168-
169- ### Run Tests Without Docker
170-
171- ``` bash
172- pip install pytest
173- pytest src/test
174- ```
175143
176144## Environment Variables
177145
0 commit comments