Files
hnh-map/docs/configuration.md
Nikolay Tatarinov 2c7bf48719 Implement OAuth login functionality and enhance documentation
- Added support for Google OAuth login, including new API endpoints for OAuth providers and callbacks.
- Updated user authentication logic to handle OAuth-only users.
- Enhanced README.md and deployment documentation with OAuth setup instructions.
- Modified frontend components to include OAuth login options and improved error handling.
- Updated configuration files to include new environment variables for OAuth integration.
2026-02-25 00:26:38 +03:00

31 lines
1.7 KiB
Markdown
Raw 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.
# Настройка
## Переменные окружения и флаги
| Переменная / флаг | Описание | По умолчанию |
|-------------------|----------|--------------|
| `HNHMAP_PORT` | Порт HTTP-сервера | 8080 |
| `-port` | То же (флаг командной строки) | значение `HNHMAP_PORT` или 8080 |
| `HNHMAP_BOOTSTRAP_PASSWORD` | Пароль для первой настройки: при отсутствии пользователей вход как `admin` с этим паролем создаёт первого админа | — |
| `HNHMAP_BASE_URL` | Полный URL приложения для OAuth redirect_uri (например `https://map.example.com`). Если не задан, берётся из `Host` и `X-Forwarded-*` | — |
| `HNHMAP_OAUTH_GOOGLE_CLIENT_ID` | Google OAuth Client ID | — |
| `HNHMAP_OAUTH_GOOGLE_CLIENT_SECRET` | Google OAuth Client Secret | — |
| `-grids` | Каталог гридов (флаг командной строки; в Docker обычно `-grids=/map`) | `grids` |
Пример для первого запуска:
```bash
export HNHMAP_BOOTSTRAP_PASSWORD=your-secure-password
./hnh-map -grids=./grids -port=8080
```
В Docker часто монтируют том в `/map` и запускают с `-grids=/map`.
Для фронта (Nuxt) в режиме разработки:
| Переменная | Описание |
|------------|----------|
| `NUXT_PUBLIC_API_BASE` | Базовый путь к API (например `/map/api` при прокси к бэкенду) |
См. также [.env.example](../.env.example) в корне репозитория.