Skip to content

Commit

Permalink
services/nomad/infrastructure/nginx-mirror: add buildbot config
Browse files Browse the repository at this point in the history
following upstream recommendations:
https://docs.buildbot.net/current/manual/configuration/www.html#reverse-proxy-configuration

Closes: #198 [via git-merge-pr]
  • Loading branch information
classabbyamp authored and the-maldridge committed Sep 29, 2024
1 parent bf4e38d commit 54b868e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/nomad/infrastructure/nginx-mirror.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ job "nginx" {
"10-mirror.conf",
"10-proxy.conf",
"10-sources.conf",
"10-wiki.conf"
"10-wiki.conf",
"10-buildbot.conf",
]

content {
Expand Down
30 changes: 30 additions & 0 deletions services/nomad/infrastructure/nginx-sites/10-buildbot.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
server {
include /etc/nginx/fragments/ssl.conf;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name build.voidlinux.org;

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-Forwarded-Server $host;
proxy_set_header X-Forwarded-Host $host;

location / {
proxy_pass http://buildbot-www.service.consul:8010/;
}

location /sse/ {
proxy_buffering off;
proxy_pass http://buildbot-www.service.consul:8010/sse/;
}

location /ws {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_pass http://buildbot-www.service.consul:8010/ws;
proxy_read_timeout 6000s;
}
}

0 comments on commit 54b868e

Please sign in to comment.