29 lines
866 B
Nginx Configuration File
29 lines
866 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
|
|
# API бэкенда (Spring Boot в compose-сервисе client-backend)
|
|
location /api/ {
|
|
proxy_pass http://client-backend:8181;
|
|
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;
|
|
}
|
|
|
|
# Swagger UI бэкенда (удобно на первое время, потом можно закрыть)
|
|
location /swagger-ui/ {
|
|
proxy_pass http://client-backend:8181;
|
|
proxy_set_header Host $host;
|
|
}
|
|
location /v3/api-docs {
|
|
proxy_pass http://client-backend:8181;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
# Статика React SPA
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
try_files $uri /index.html;
|
|
}
|
|
}
|