Skip to content

Commit

Permalink
Config grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
sdunesme committed Jul 4, 2022
1 parent 80cdc53 commit 838f634
Show file tree
Hide file tree
Showing 8 changed files with 724 additions and 750 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ dmypy.json
db-backup.sh
woodcamrm_db.sql

# SSL certificates
ssl_certs/*.pem

# Prometheus certificates, passwords and configurations
prometheus/web.yml
prometheus/alertmanager.yml
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The .env file contains all settings to initialize and run WoodCam RM.

- Copy the example .env file and make the required configuration changes (database, etc...)
- Install docker-compose (https://docs.docker.com/compose/install/)
- If you want to use TLS encryption, place your cacert.pem and privatekey.pem in ./prometheus.
- If you want to use TLS encryption, place your cacert.pem and privatekey.pem in ./ssl_certs.

```bash
# Run containers
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ services:
volumes:
- prometheus-data:/prometheus
- prometheus-config:/etc/prometheus
- ./ssl_certs/cert.pem:/etc/prometheus/cert.pem
- ./ssl_certs/privkey.pem:/etc/prometheus/privkey.pem
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
Expand Down Expand Up @@ -121,6 +123,8 @@ services:
volumes:
- grafana-data:/var/lib/grafana
- grafana-config:/etc/grafana
- ./ssl_certs/cert.pem:/etc/grafana/cert.pem
- ./ssl_certs/privkey.pem:/etc/grafana/privkey.pem
environment:
GF_SECURITY_ADMIN_USER: ${DEFAULT_USER}
GF_SECURITY_ADMIN_PASSWORD: ${DEFAULT_PASSWORD}
Expand All @@ -129,6 +133,8 @@ services:
GF_SMTP_USER: ${MAIL_USERNAME}
GF_SMTP_PASSWORD: ${MAIL_PASSWORD}
GF_SMTP_FROM_ADDRESS: ${MAIL_DEFAULT_SENDER}
GF_SERVER_CERT_FILE: /etc/grafana/cert.pem
GF_SERVER_CERT_KEY: /etc/grafana/privkey.pem
ports:
- 3000:3000

Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ services:
volumes:
- prometheus-data:/prometheus
- prometheus-config:/etc/prometheus
- ./ssl_certs/cert.pem:/etc/prometheus/cert.pem
- ./ssl_certs/privkey.pem:/etc/prometheus/privkey.pem
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
Expand Down Expand Up @@ -121,6 +123,8 @@ services:
volumes:
- grafana-data:/var/lib/grafana
- grafana-config:/etc/grafana
- ./ssl_certs/cert.pem:/etc/grafana/cert.pem
- ./ssl_certs/privkey.pem:/etc/grafana/privkey.pem
environment:
GF_SECURITY_ADMIN_USER: ${DEFAULT_USER}
GF_SECURITY_ADMIN_PASSWORD: ${DEFAULT_PASSWORD}
Expand All @@ -129,6 +133,8 @@ services:
GF_SMTP_USER: ${MAIL_USERNAME}
GF_SMTP_PASSWORD: ${MAIL_PASSWORD}
GF_SMTP_FROM_ADDRESS: ${MAIL_DEFAULT_SENDER}
GF_SERVER_CERT_FILE: /etc/grafana/cert.pem
GF_SERVER_CERT_KEY: /etc/grafana/privkey.pem
ports:
- 3000:3000

Expand Down
Loading

0 comments on commit 838f634

Please sign in to comment.