mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
Allow enabling and disabling prometheus exporter in docker-compose.yml
This commit is contained in:
parent
da19196660
commit
6925e5598b
5 changed files with 20 additions and 3 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -9,7 +9,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||
|
||||
### Added
|
||||
|
||||
- Dawarich now exports metrics to Prometheus. You can find the metrics at `/metrics` endpoint. The metrics are being exported in the Prometheus format and can be scraped by Prometheus server. You can find an example of how to scrape the metrics in the `docker-compose.yml` file in the repository.
|
||||
- Dawarich now can export metrics to Prometheus. You can find the metrics at `your.host:9394/metrics` endpoint. The metrics are being exported in the Prometheus format and can be scraped by Prometheus server. To enable exporting, set the `PROMETHEUS_EXPORTER_ENABLED` env var in your docker-compose.yml to `true`. Example:
|
||||
|
||||
```yaml
|
||||
dawarich_app:
|
||||
image: freikin/dawarich:latest
|
||||
container_name: dawarich_app
|
||||
environment:
|
||||
...
|
||||
PROMETHEUS_EXPORTER_ENABLED: "true"
|
||||
```
|
||||
|
||||
# 0.16.5 - 2024-11-18
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
web: bin/rails server -p 3000 -b 0.0.0.0
|
||||
prometheus_exporter: bundle exec prometheus_exporter
|
||||
|
|
|
|||
2
Procfile.prometheus.dev
Normal file
2
Procfile.prometheus.dev
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
web: bin/rails server -p 3000 -b 0.0.0.0
|
||||
prometheus_exporter: bundle exec prometheus_exporter
|
||||
6
bin/dev
6
bin/dev
|
|
@ -6,4 +6,10 @@ then
|
|||
gem install foreman
|
||||
fi
|
||||
|
||||
if [ "$PROMETHEUS_EXPORTER_ENABLED" = "true" ]; then
|
||||
echo "Starting Foreman with Procfile.prometheus.dev..."
|
||||
foreman start -f Procfile.prometheus.dev
|
||||
else
|
||||
echo "Starting Foreman with Procfile.dev..."
|
||||
foreman start -f Procfile.dev
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ services:
|
|||
DISTANCE_UNIT: km
|
||||
PHOTON_API_HOST: photon.komoot.io
|
||||
PHOTON_API_USE_HTTPS: true
|
||||
PROMETHEUS_EXPORTER_ENABLED: false
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
|
|
|
|||
Loading…
Reference in a new issue