Skip to content

Commit 1a79b00

Browse files
authored
Merge pull request #74 from cryptomator/docker-compose-yaml
Add Docker Support with docker-compose.yml
2 parents 0f8302c + e195849 commit 1a79b00

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

README.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,18 @@ We prefer contributions to our documentation to be in English, but if you wish t
2020
### Using Docker
2121

2222
- Install [Docker](https://www.docker.com/)
23-
- Build a Docker image as per the Dockerfile included in this repo. You just need to run the command below (don't omit the dot at the end).
23+
#### For live preview:
2424

2525
```
26-
docker build -t cryptomator_docs_image .
26+
docker compose up
2727
```
2828

29-
Run the commands below in the repo's directory to start a Docker container based on the built image.
30-
31-
For live preview:
32-
33-
```
34-
docker run -p 8000:8000 -v $(pwd)/source:/source -v $(pwd)/build:/build cryptomator_docs_image sphinx-autobuild -b html /source /build/html --host 0.0.0.0
35-
```
36-
37-
To build site:
29+
The live preview will be available at: [http://localhost:8000/](http://localhost:8000/)
30+
31+
#### To build site:
3832

3933
```
40-
docker run -v $(pwd)/source:/source -v $(pwd)/build:/build cryptomator_docs_image sphinx-build -M html /source /build/html
34+
docker compose exec cryptomator-docs sphinx-build -M html /source /build/html
4135
```
4236

4337
### Without Using Docker
@@ -49,13 +43,13 @@ We prefer contributions to our documentation to be in English, but if you wish t
4943
pip install sphinx sphinx_rtd_theme sphinx-autobuild
5044
```
5145

52-
For live preview:
46+
#### For live preview:
5347

5448
```
5549
make clean livehtml
5650
```
5751

58-
To build site:
52+
#### To build site:
5953

6054
```
6155
make clean html

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
cryptomator-docs:
3+
build: .
4+
ports:
5+
- "8000:8000"
6+
volumes:
7+
- ./source:/source
8+
- ./build:/build
9+
command: >
10+
sphinx-autobuild
11+
-b html
12+
/source
13+
/build/html
14+
--host 0.0.0.0

0 commit comments

Comments
 (0)