Skip to content

Commit

Permalink
Merge pull request #12 from ngandrass/feature/update-docs
Browse files Browse the repository at this point in the history
Feature: Update docs
  • Loading branch information
ngandrass authored Oct 5, 2024
2 parents 4a8473e + 0c63b8d commit dddbc9b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.gitignore
.venv/
.idea/
docs/
out/
tests/
*.iml
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
allows testing the Moodle plugin without the need to set up a local quiz
archive worker service right away. Productive instances of the quiz archive
worker service will remain fully unaffected by this.
- Improve documentation and add reference to official documentation website


## Version 2.0.0 (2024-08-21)
Expand Down
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ calculated to allow integrity checks.
You can install this application in several ways, however, the easiest and
preferred way is to use [Docker Compose](#docker-compose).

Detailed installation and configuration instructions can be found within the
[official documentation](https://quizarchiver.gandrass.de/).

[![Quiz Archiver: Official Documentation](docs/assets/docs-button.png)](https://quizarchiver.gandrass.de/)

If you have problems installing the Quiz Archiver or the Quiz Archive Worker
Service, or you have further questions, please feel free to open an issue within
the [GitHub issue tracker](https://github.com/ngandrass/moodle-quiz_archiver/issues).


## Docker Compose

Expand All @@ -46,9 +55,6 @@ preferred way is to use [Docker Compose](#docker-compose).
- "8080:8080"
environment:
- QUIZ_ARCHIVER_LOG_LEVEL=INFO
- QUIZ_ARCHIVER_QUEUE_SIZE=8
- QUIZ_ARCHIVER_REQUEST_TIMEOUT_SEC=1800
- QUIZ_ARCHIVER_DOWNLOAD_MAX_FILESIZE_BYTES=512000000
```
3. From inside the `moodle-quiz-archive-worker` folder, run the application:
`docker compose up`
Expand Down Expand Up @@ -79,20 +85,20 @@ docker compose down
## Docker

1. Install [Docker](https://www.docker.com/)
2. Run a container: `docker run --rm -it -p 8080:8080 ngandrass/moodle-quiz-archive-worker:latest`
2. Run a container: `docker run -p 8080:8080 ngandrass/moodle-quiz-archive-worker:latest`

You can change the host port the application is bound to by changing the first
port number in the `-p` argument of the `docker run` command. Example:

```shell
docker run --rm -it -p 9000:8080 moodle-quiz-archive-worker:latest
docker run -p 9000:8080 moodle-quiz-archive-worker:latest
```

You can change configuration values by setting the respective environment
variables. Example:

```shell
docker run --rm -it -e QUIZ_ARCHIVER_LOG_LEVEL=DEBUG -p 8080:8080 moodle-quiz-archive-worker:latest
docker run -e QUIZ_ARCHIVER_LOG_LEVEL=DEBUG -p 8080:8080 moodle-quiz-archive-worker:latest
```

For more details and all available configuration parameters see [Configuration](#configuration).
Expand All @@ -104,7 +110,7 @@ For more details and all available configuration parameters see [Configuration](
2. Clone this repository: `git clone https://github.com/ngandrass/moodle-quiz-archive-worker`
3. Switch into the repository directory: `cd moodle-quiz-archive-worker`
4. Build the Docker image: `docker build -t moodle-quiz-archive-worker:latest .`
5. Run a container: `docker run --rm -it -p 8080:8080 moodle-quiz-archive-worker:latest`
5. Run a container: `docker run -p 8080:8080 moodle-quiz-archive-worker:latest`


## Manual Installation
Expand All @@ -120,7 +126,7 @@ For more details and all available configuration parameters see [Configuration](
You can change configuration values by prepending the respective environment
variables. Example:

```shell
```text
QUIZ_ARCHIVER_SERVER_PORT=9000 poetry run python moodle-quiz-archive-worker.py
```

Expand Down Expand Up @@ -194,23 +200,23 @@ using the following environment variables:

Development dependencies are not installed by default. To install them, run:

```shell
```text
poetry install --with dev
```

## Running Unit Tests

Unit tests are handled by `pytest`. To run all test suites execute:

```shell
```text
poetry run pytest
```

If you want to see the console output of the tests, as well as logger calls, you
need to specify `-s` (for test output) and `--log-cli-level=DEBUG` (for app
logging). Example:

```shell
```text
poetry run pytest -s --log-cli-level=DEBUG
```

Expand All @@ -219,7 +225,7 @@ poetry run pytest -s --log-cli-level=DEBUG
Code coverage is evaluated using the `coverage` Python package. To run coverage
checks run the following commands:

```shell
```text
poetry run coverage run -m pytest
poetry run coverage html
```
Expand Down
Binary file added docs/assets/docs-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dddbc9b

Please sign in to comment.