Update: get ssl cert
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- ./prometheus-web.yml:/etc/prometheus/prometheus-web.yml:ro
|
||||
- prom_data:/prometheus
|
||||
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--web.config.file=/etc/prometheus/prometheus-web.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--web.enable-admin-api'
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
ports:
|
||||
- "3001:3000"
|
||||
volumes:
|
||||
- ./grafana_provisioning/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml:ro
|
||||
- grafana_data:/var/lib/grafana
|
||||
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_USER="{{ grafana_admin_user }}"
|
||||
- GF_SECURITY_ADMIN_PASSWORD="{{ grafana_admin_password }}"
|
||||
- GF_USERS_ALLOW_SIGN_UP=false
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
depends_on:
|
||||
- prometheus
|
||||
|
||||
volumes:
|
||||
prom_data:
|
||||
grafana_data:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name {{ domain }};
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name {{ domain }};
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/{{ domain }}/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3001;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user