modified: main_dc/docker-compose.yml

modified:   main_dc/nginx/nginx-ssl.conf
	modified:   main_dc/yalarba/api_es/Dockerfile
	modified:   main_dc/yalarba/api_es/cmd/main.go
	modified:   main_dc/yalarba/api_es/go.mod
	new file:   main_dc/yalarba/api_es/go.sum
add api_es for REST API backend to easysite, add config nginx, add
server connection from api_es to db_tp
This commit is contained in:
2025-10-29 06:11:21 +05:00
parent 53477c6a34
commit d45d99517c
6 changed files with 321 additions and 6 deletions
+23
View File
@@ -100,6 +100,29 @@ server {
proxy_send_timeout 600;
proxy_read_timeout 600;
}
# Новый блок для API
location /api/ {
proxy_pass http://api_easysite:8081/api/;
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-Port $server_port;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
# CORS headers
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
add_header Access-Control-Allow-Headers "Content-Type, Authorization";
# Handle preflight requests
if ($request_method = OPTIONS) {
return 204;
}
}
}
server {