- Added optional HTTP server timeout configurations (`HNHMAP_READ_TIMEOUT`, `HNHMAP_WRITE_TIMEOUT`, `HNHMAP_IDLE_TIMEOUT`) to `.env.example` and updated the server initialization in `main.go` to utilize these settings. - Enhanced API documentation for the `rebuildZooms` endpoint to clarify its background processing and polling mechanism for status updates. - Updated `configuration.md` to include new timeout environment variables for better configuration guidance. - Improved error handling in the client for large request bodies, ensuring appropriate responses for oversized payloads.
1.5 KiB
1.5 KiB
Configuration
Environment variables and flags
| Variable / flag | Description | Default |
|---|---|---|
HNHMAP_PORT |
HTTP server port | 8080 |
-port |
Same (command-line flag) | value of HNHMAP_PORT or 8080 |
HNHMAP_READ_TIMEOUT |
HTTP server read timeout (e.g. 30s) |
30s |
HNHMAP_WRITE_TIMEOUT |
HTTP server write timeout (e.g. 60s) |
60s |
HNHMAP_IDLE_TIMEOUT |
HTTP server idle timeout (e.g. 120s) |
120s |
HNHMAP_BOOTSTRAP_PASSWORD |
Password for initial setup: when no users exist, logging in as admin with this password creates the first admin user |
— |
HNHMAP_BASE_URL |
Full application URL for OAuth redirect_uri (e.g. https://map.example.com). If not set, derived from Host and X-Forwarded-* headers |
— |
HNHMAP_OAUTH_GOOGLE_CLIENT_ID |
Google OAuth Client ID | — |
HNHMAP_OAUTH_GOOGLE_CLIENT_SECRET |
Google OAuth Client Secret | — |
-grids |
Grid storage directory (command-line flag; in Docker typically -grids=/map) |
grids |
Example for first run:
export HNHMAP_BOOTSTRAP_PASSWORD=your-secure-password
./hnh-map -grids=./grids -port=8080
In Docker, a volume is typically mounted at /map and the app is started with -grids=/map.
For the frontend (Nuxt) in development mode:
| Variable | Description |
|---|---|
NUXT_PUBLIC_API_BASE |
Base path to the API (e.g. /map/api when proxying to the backend) |
See also .env.example in the repository root.