Skip to content

Commit

Permalink
add some documentation for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
lilioid committed Feb 2, 2024
1 parent 861fd35 commit cb77746
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# vinywaji

> Keep track of how many drinks people have bought
Vinywaji is Swahili for "drinks".
Expand All @@ -19,6 +20,7 @@ A docker image is built automatically that follows the master branch of the repo
It is available as `ghcr.io/fsinfuhh/vinywaji:dev-latest`.

Simply start it via

```shell
docker run --name vinywaji ghcr.io/fsinfuhh/vinywaji:latest
```
Expand All @@ -28,9 +30,11 @@ I.e. `docker run -e VW_SECRET_KEY=foobar123 …`.

### On Baremetal from source

*Although this deployment works, it is not recommended. If you need to use a deployment without containers, you should serve this application via uwsgi, gunicorn or the like.*
*Although this deployment works, it is not recommended. If you need to use a deployment without containers, you should
serve this application via uwsgi, gunicorn or the like.*

To build the application from source, follow the following steps:

```shell
# get the code
git clone https://github.com/fsinfuhh/vinywaji.git
Expand All @@ -41,6 +45,7 @@ pipenv install --ignore-pipfile
```

To start it:

```shell
pipenv shell
./src/manage.py check --deploy
Expand All @@ -52,14 +57,14 @@ pipenv shell

The application is configured at runtime via the following environment variables:

| Name | Default | Description | Notes |
|--------------------------|------------------------|-------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
| VW_DB | *required* | Url that specifies the complete database connection. [Documentation](https://pypi.org/project/dj-database-url/) | In container based deployments this preconfigured to point to `/app/data/db.sqlite` |
| VW_SECRET_KEY | *required* | Django secret key. **Keep this secret!** ||
| VW_ALLOWED_HOSTS | *required* | List of hostnames which may be used when accessing the application. ||
| VW_SERVED_OVER_HTTPS | `false` | Whether the application is served over HTTPS. If enabled, automatic redirects and additional security measures are activated. ||
| VW_HSTS_SECONDS | `63072000` | If larger than 0 and `BL_SERVED_OVER_HTTPS` is true, HSTS is enabled with this configured value. ||
| VW_TRUST_REVERSE_PROXY | `false` | If true, headers set by a reverse proxy (i.e. `X-Forwarded-Proto`) are trusted. ||
||
| VW_OPENID_CLIENT_ID | *required* | Mafiasi-Identity client ID. Used for authentication ||
| VW_OPENID_CLIENT_SECRET | *required* | Mafiasi-Identity client secret. Used for authentication ||
| Name | Default | Description | Notes |
|-------------------------|------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| VW_DB | *required* | Url that specifies the complete database connection. [Documentation](https://pypi.org/project/dj-database-url/) | In container based deployments this preconfigured to point to `/app/data/db.sqlite` |
| VW_SECRET_KEY | *required* | Django secret key. **Keep this secret!** | |
| VW_ALLOWED_HOSTS | *required* | List of hostnames which may be used when accessing the application. | |
| VW_SERVED_OVER_HTTPS | `false` | Whether the application is served over HTTPS. If enabled, automatic redirects and additional security measures are activated. | |
| VW_HSTS_SECONDS | `63072000` | If larger than 0 and `BL_SERVED_OVER_HTTPS` is true, HSTS is enabled with this configured value. | |
| VW_TRUST_REVERSE_PROXY | `false` | If true, headers set by a reverse proxy (i.e. `X-Forwarded-Proto`) are trusted. | |
| VW_ENABLE_METRICS | `false` | If true, enable metric exporting via OpenTelemetry. | See the [Opentelemetry Docs](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/) on how to configure the exporter i.e. to which collector it exports. |
| VW_OPENID_CLIENT_ID | *required* | Mafiasi-Identity client ID. Used for authentication | |
| VW_OPENID_CLIENT_SECRET | *required* | Mafiasi-Identity client secret. Used for authentication | |

0 comments on commit cb77746

Please sign in to comment.