Skip to content

Commit

Permalink
Shallow docs setup with MKDocs #1686
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed Jul 1, 2024
1 parent 50e9d83 commit 7024fa7
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 38 deletions.
8 changes: 2 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ build:
tools:
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml
mkdocs:
configuration: mkdocs.yml

python:
install:
Expand Down
1 change: 1 addition & 0 deletions documentation/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# DSMR-reader documentation
4 changes: 2 additions & 2 deletions wiki/reference/API.md → documentation/docs/reference/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ The application has an API, allowing you to insert/create readings and retrieve
## Configuration
You can access the API-documentation by selecting the **Support** menu item in DSMR-reader.

![Support](/wiki/static/screenshots/api/support.png)
![Screenshot](/static/screenshots/api/support.png)


### Enable API
The API is disabled by default in the application. You may enable it in the **Configuration**.

![API settings](/wiki/static/screenshots/api/api-settings.png)
![Screenshot](/static/screenshots/api/api-settings.png)


## API key
Expand Down
File renamed without changes
10 changes: 10 additions & 0 deletions documentation/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
site_name: DSMR-reader Documentation
site_url: https://github.com/dsmrreader/dsmr-reader
site_description: DSMR-reader
site_author: Dennis Siemensma
copyright: Dennis Siemensma
theme: readthedocs
locale: en
markdown_extensions:
- toc:
baselevel: 2
1 change: 1 addition & 0 deletions documentation/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mkdocs==1.6
16 changes: 4 additions & 12 deletions provisioning/container/Containerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,11 @@ ENV POETRY_VIRTUALENVS_IN_PROJECT=true
RUN pip install poetry
COPY ./src/ /app/
RUN poetry install --with dev --no-root
EXPOSE 8000
ENTRYPOINT ["poetry", "run"]


FROM local-dsmrreader-base AS local-dsmrreader-docs
WORKDIR /app-docs
COPY ./docs/requirements.txt /app-docs/
RUN pip install -r requirements.txt

FROM local-dsmrreader-docs AS local-dsmrreader-docs-en
EXPOSE 10000
ENTRYPOINT sphinx-autobuild . /var/tmp/_build/html --host 0.0.0.0 --port 10000 -D language=en

FROM local-dsmrreader-docs AS local-dsmrreader-docs-nl
EXPOSE 10000
ENTRYPOINT sphinx-autobuild . /var/tmp/_build/html --host 0.0.0.0 --port 10000 -D language=nl
WORKDIR /app
COPY ./documentation/ /app/
RUN pip install -r /app/requirements.txt
ENTRYPOINT ["mkdocs"]
24 changes: 6 additions & 18 deletions provisioning/container/compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,19 @@ services:
- ~/Desktop:/run/host/Desktop/

# http://localhost:10000
dsmr-docs-en:
container_name: dsmr-docs-en
restart: 'unless-stopped'
dsmr-docs:
container_name: dsmr-docs
restart: 'on-failure'
command: 'serve --dev-addr 0.0.0.0:10000'
build:
context: .
dockerfile: provisioning/container/Containerfile-dev
target: local-dsmrreader-docs-en
target: local-dsmrreader-docs
volumes:
- ./docs:/app-docs
- ./documentation:/app
ports:
- '10000:10000'

# http://localhost:10001
dsmr-docs-nl:
container_name: dsmr-docs-nl
restart: 'unless-stopped'
build:
context: .
dockerfile: provisioning/container/Containerfile-dev
target: local-dsmrreader-docs-nl
volumes:
- ./docs:/app-docs
ports:
- '10001:10000'

mosquitto:
container_name: mosquitto-dev
image: eclipse-mosquitto:2
Expand Down

0 comments on commit 7024fa7

Please sign in to comment.