Skip to content
Open
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
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ services:
image: oscript/backend
ports:
- "3030"
environment:
# Секрет подписи вебхука публикации из GitHub Actions (SITE_WEBHOOK_SECRET в OneScript)
- publish_secret
volumes:
- web_content:/var/www/

Expand Down
11 changes: 11 additions & 0 deletions web/nginx/sites-enabled/oscript.io
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ server {

resolver 127.0.0.11 valid=30s;

# Вебхук публикации из GitHub Actions: сайт отвечает, когда уже скачал файлы версии с GitHub
location = /api/publish {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_read_timeout 1200;
set $target_url http://site:3030;
proxy_pass $target_url;
}

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
Expand Down