Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker-compose.monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ services:
GF_SMTP_FROM_NAME: ${GF_SMTP_FROM_NAME:-Rythmify Monitoring}
GF_SMTP_STARTTLS_POLICY: MandatoryStartTLS
ALERT_EMAIL_TO: ${ALERT_EMAIL_TO:-}
GF_SERVER_ROOT_URL: https://rythmify.duckdns.org/grafana/
GF_SERVER_ROOT_URL: https://rythmify-back.duckdns.org/grafana/
GF_SERVER_SERVE_FROM_SUB_PATH: "true"
volumes:
- grafana_data:/var/lib/grafana
Expand Down Expand Up @@ -99,7 +99,7 @@ services:
container_name: rythmify_nginx_exporter
restart: unless-stopped
command:
- '--nginx.scrape-uri=http://host.docker.internal/nginx_status'
--nginx.scrape-uri=http://host.docker.internal:8081/nginx_status
extra_hosts:
- host.docker.internal:host-gateway
ports:
Expand Down
49 changes: 49 additions & 0 deletions nginx/rythmify.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Backend — rythmify-back.duckdns.org
geoip2 /var/lib/GeoIP/GeoLite2-Country.mmdb {
$geoip2_data_country_code country iso_code;
}

server {
server_name rythmify-back.duckdns.org;

location /grafana {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
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 $scheme;
}

location /health {
proxy_pass http://localhost:8080;
}

location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
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 $scheme;
proxy_set_header X-Country-Code $geoip2_data_country_code;
proxy_cache_bypass $http_upgrade;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/rythmify.duckdns.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/rythmify.duckdns.org/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}

# Internal stub_status for nginx-prometheus-exporter
server {
listen 172.17.0.1:8081;
location /nginx_status {
stub_status;
allow all;
}
}
Loading