diff --git a/README.md b/README.md index 529f881..13a9e30 100644 --- a/README.md +++ b/README.md @@ -218,96 +218,6 @@ server { } ``` -### Вариант 3: Статика без Docker - -**Самый быстрый вариант - раздача статики напрямую.** - -```bash -# Соберите проект -npm install -npm run build - -# Скопируйте dist на сервер -scp -r dist/* user@server:/var/www/cabinet/ -``` - -Конфигурация Nginx для статики: - -```nginx -server { - listen 443 ssl http2; - server_name cabinet.yourdomain.com; - - ssl_certificate /path/to/cert.pem; - ssl_certificate_key /path/to/key.pem; - - root /var/www/cabinet; - index index.html; - - # Gzip - gzip on; - gzip_types text/plain text/css application/json application/javascript text/xml application/xml; - - # API на backend - location /api/ { - rewrite ^/api/(.*) /$1 break; - proxy_pass http://backend_bot:8080; - 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; - } - - # SPA routing - location / { - try_files $uri $uri/ /index.html; - } - - # Кэширование статики - location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { - expires 1y; - add_header Cache-Control "public, immutable"; - } -} -``` - -## Разработка - -### Установка зависимостей - -```bash -npm install -``` - -### Запуск dev сервера - -```bash -npm run dev -``` - -Откроется на `http://localhost:5173` - -### Сборка для production - -```bash -npm run build -``` - -Результат в папке `dist/` - -### Проверка типов - -```bash -npm run type-check -``` - -### Линтинг - -```bash -npm run lint -``` - ## Переменные окружения ### Build-time (используются при сборке)