Use docker compose to simplify dev and build

This commit is contained in:
Calum Lind 2024-07-08 10:19:37 +01:00
parent 3dbf2f9a4f
commit f4ad355a0e
No known key found for this signature in database
GPG Key ID: 90597A687B836BA3
3 changed files with 19 additions and 2 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
site

View File

@ -14,8 +14,7 @@ might remain and need fixed.
### Local dev
```
docker build -t deluge-mkdocs .
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs deluge-mkdocs
docker compose up
```
Open browser at http://localhost:8000
@ -24,6 +23,14 @@ Live reloading will refresh the served pages modifying mkdocs.yml and
markdown pages. Changes to any `overrides` files requires restarting
docker server.
### Build site
```
docker compose run mkdocs build
```
The build output will be in `site` directory.
### Override home and header
The `overrides` directory contains the files to set a custom homepage

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
services:
mkdocs:
container_name: mkdocs
build: .
restart: always
ports:
- "8000:8000"
volumes:
- "${PWD}:/docs"