Skip to content

Commit

Permalink
Integrate Roadrunner metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusklocke committed Jan 12, 2025
1 parent 3e9385f commit ce92bd9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docker/nginx/dev-roadrunner-ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ limit_req_status 429;
upstream php {
server php:8080 max_fails=0 fail_timeout=30s;
}
upstream php-metrics {
server php:8081 max_fails=0 fail_timeout=30s;
}

server {
listen 80 default_server;
Expand Down Expand Up @@ -48,6 +51,15 @@ server {
return 502 '{"errors":[{"code":"ERR-INTERNAL","message":"Bad gateway"}]}';
}

location /api/metrics {
proxy_pass http://php-metrics;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}

location /api {
proxy_pass http://php;
proxy_set_header Host $host;
Expand Down
3 changes: 3 additions & 0 deletions docker/php/roadrunner/.rr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ http:
address: "0.0.0.0:8080"
pool:
num_workers: 1
middleware: [ "http_metrics" ]
metrics:
address: "0.0.0.0:8081"
logs:
channels:
http:
Expand Down

0 comments on commit ce92bd9

Please sign in to comment.