webhook
This commit is contained in:
@@ -29,4 +29,21 @@ server {
|
||||
proxy_connect_timeout 30s;
|
||||
proxy_read_timeout 60s;
|
||||
}
|
||||
|
||||
# GitHub webhook deploy -> container webhook (adnanh/webhook) di 127.0.0.1:9001.
|
||||
# Endpoint GitHub: https://taklimatspr.apps.mbip.my/hooks/deploy
|
||||
location /hooks/ {
|
||||
proxy_pass http://127.0.0.1:9001;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# Deploy (build) ambil masa; bagi masa yg cukup utk response.
|
||||
proxy_read_timeout 600s;
|
||||
}
|
||||
}
|
||||
|
||||
# NOTA: Selepas pasang SSL (certbot), blok di atas biasanya bertukar jadi
|
||||
# `listen 443 ssl`. Pastikan KEDUA-DUA `location /` dan `location /hooks/`
|
||||
# berada dalam blok 443 itu, dan `X-Forwarded-Proto $scheme` kekal ada.
|
||||
|
||||
Reference in New Issue
Block a user