Files
runners-calendar/docker/nginx.frontend.conf
Vaka.pro a4f8c37b84
Some checks failed
CI / build-and-test (pull_request) Has been cancelled
fix(docker): use unique Compose service name for API upstream
Rename stack service from backend to runners-calendar-backend so DNS on
shared external networks (e.g. postgres_default) cannot resolve to
another project’s backend. Nginx proxy_pass targets the same hostname.

Made-with: Cursor
2026-04-12 18:39:04 +03:00

21 lines
563 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
# Браузер ходит на тот же origin: /api/* → бэкенд с тем же префиксом /api
location /api/ {
proxy_pass http://runners-calendar-backend: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;
}
}