Files
hnh-map/docs/configuration.md
Nikolay Tatarinov 6529d7370e Add configuration files and update project documentation
- Introduced .editorconfig for consistent coding styles across the project.
- Added .golangci.yml for Go linting configuration.
- Updated AGENTS.md to clarify project structure and components.
- Enhanced CONTRIBUTING.md with Makefile usage for common tasks.
- Updated Dockerfiles to use Go 1.24 and improved build instructions.
- Refined README.md and deployment documentation for clarity.
- Added testing documentation in testing.md for backend and frontend tests.
- Introduced Makefile for streamlined development commands and tasks.
2026-03-01 01:51:47 +03:00

1.3 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_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.