mirror of https://github.com/statping/statping
Updated Docker Compose (markdown)
parent
7ee53eb462
commit
89960f0dd5
|
@ -8,7 +8,7 @@ This page includes multiple docker-compose.yml setups for you to run. There are
|
||||||
- [Nginx as proxy pass](#nginx-proxy-pass)
|
- [Nginx as proxy pass](#nginx-proxy-pass)
|
||||||
- [Nginx with LetEncrypt SSL Cert](#nginx-proxy-pass-with-ssl-letencrypt)
|
- [Nginx with LetEncrypt SSL Cert](#nginx-proxy-pass-with-ssl-letencrypt)
|
||||||
### Metrics
|
### Metrics
|
||||||
- Grafana with Prometheus
|
- [Grafana with Prometheus](#grafana-dashboard-with-prometheus)
|
||||||
---
|
---
|
||||||
|
|
||||||
# Docker Volumes
|
# Docker Volumes
|
||||||
|
@ -174,3 +174,67 @@ nginx-ssl:
|
||||||
DEFAULT_EMAIL: info@mydomain.com
|
DEFAULT_EMAIL: info@mydomain.com
|
||||||
NGINX_PROXY_CONTAINER: nginx
|
NGINX_PROXY_CONTAINER: nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Grafana Dashboard with Prometheus
|
||||||
|
Grafana is an awesome metric visualizer that allows you to create some awesome dashboards. We've already created a [Grafana Dashboard](https://grafana.com/grafana/dashboards/6950) that you can easy import! Checkout the [Grafana Wiki](https://github.com/hunterlong/statping/wiki/Prometheus-Exporter) and the [Prometheus Exporter Wiki](https://github.com/hunterlong/statping/wiki/Prometheus-Exporter) for more details.
|
||||||
|
|
||||||
|
##### `prometheus.yml` config file
|
||||||
|
This file should be mounted to `/etc/prometheus/prometheus.yml` in the Prometheus container.
|
||||||
|
```yaml
|
||||||
|
global:
|
||||||
|
scrape_interval: 30s
|
||||||
|
evaluation_interval: 30s
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: 'statping'
|
||||||
|
scrape_interval: 30s
|
||||||
|
bearer_token: 'SECRET API KEY HERE'
|
||||||
|
static_configs:
|
||||||
|
- targets: ['statping:8080']
|
||||||
|
```
|
||||||
|
> Be sure to replace `SECRET API KEY HERE` with your API Secret on the Settings page.
|
||||||
|
|
||||||
|
##### `docker-compose.yml` file for Statping, Grafana and Prometheus
|
||||||
|
```yaml
|
||||||
|
statping:
|
||||||
|
container_name: statping
|
||||||
|
image: hunterlong/statping
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- statping_data:/app
|
||||||
|
environment:
|
||||||
|
DB_CONN: sqlite
|
||||||
|
LETSENCRYPT_HOST: demo.statping.com
|
||||||
|
VIRTUAL_HOST: demo.statping.com
|
||||||
|
VIRTUAL_PORT: 8080
|
||||||
|
|
||||||
|
prometheus:
|
||||||
|
container_name: prometheus
|
||||||
|
image: prom/prometheus:v2.0.0
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 9090:9090
|
||||||
|
volumes:
|
||||||
|
- prometheus.yml:/etc/prometheus/prometheus.yml # config file is above ^
|
||||||
|
- prometheus_data:/prometheus
|
||||||
|
links:
|
||||||
|
- statping
|
||||||
|
depends_on:
|
||||||
|
- statping
|
||||||
|
|
||||||
|
grafana:
|
||||||
|
container_name: grafana
|
||||||
|
image: grafana/grafana
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
volumes:
|
||||||
|
- grafana_data:/var/lib/grafana
|
||||||
|
environment:
|
||||||
|
- GF_SECURITY_ADMIN_PASSWORD=password123
|
||||||
|
- GF_USERS_ALLOW_SIGN_UP=false
|
||||||
|
depends_on:
|
||||||
|
- prometheus
|
||||||
|
links:
|
||||||
|
- prometheus
|
||||||
|
```
|
Loading…
Reference in New Issue