Migrate easysite from api_es to api_yal

- Remove api_es service, Dockerfile, all Go source files
- Remove api_es from docker-compose.yml, nginx-ssl.conf, .env, Makefile
- Replace nginx /api/ proxy with /api/v1/ → api_yal:8787
- Add amenity/upload domains, AuthResponse, GET /auth/me, GET /objects/my to api_yal
- Rewrite easysite frontend: types, composables, and all 5 pages to use api_yal DTOs
- Wire nuxt.config public.apiBase, add useObjects CRUD composable
- Update docs references from api_es to api_yal
This commit is contained in:
valitovgaziz
2026-06-12 10:14:38 +05:00
parent 64295b689b
commit 90a96b4125
80 changed files with 1940 additions and 5103 deletions
+4 -58
View File
@@ -231,82 +231,28 @@ server {
}
# ============================================
# ЛОКАЦИЯ: API Backend для Easysite
# ЛОКАЦИЯ: API Backend для Easysite (api_yal)
# ============================================
location /api/ {
# Отдельный API endpoint для backend
proxy_pass http://api_es:8088/;
location /api/v1/ {
proxy_pass http://api_yal:8787;
# Заголовки прокси
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 ДЛЯ OPTIONS
# ========================================
if ($request_method = OPTIONS ) {
# Динамический заголовок Origin из запроса
if ($request_method = OPTIONS) {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE';
# Подробный список разрешенных заголовков
add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
# Время кэширования preflight ответа (20 дней)
add_header 'Access-Control-Max-Age' 1728000;
# Пустой ответ для OPTIONS
add_header 'Content-Length' 0;
add_header 'Content-Type' 'text/plain charset=UTF-8';
# Возвращаем 204 без тела ответа
return 204;
}
}
location /api_yal/ {
# Отдельный API endpoint для backend
proxy_pass http://api_yal:8787/;
# Заголовки прокси
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 ДЛЯ OPTIONS
# ========================================
if ($request_method = OPTIONS ) {
# Динамический заголовок Origin из запроса
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE';
# Подробный список разрешенных заголовков
add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
# Время кэширования preflight ответа (20 дней)
add_header 'Access-Control-Max-Age' 1728000;
# Пустой ответ для OPTIONS
add_header 'Content-Length' 0;
add_header 'Content-Type' 'text/plain charset=UTF-8';
# Возвращаем 204 без тела ответа
return 204;
}
}