The geospatial mapping functionality requires API keys for Google Maps or Mapbox. These should be configured as environment variables for security.
# Google Maps API Key (for Google Maps provider)
export GOOGLE_MAPS_API_KEY="your_google_maps_api_key_here"
# Mapbox API Key (for Mapbox provider)
export MAPBOX_API_KEY="your_mapbox_api_key_here"- Go to Google Cloud Console.
- Create a new project or select an existing one.
- Enable the following APIs:
- Maps JavaScript API
- Maps Static API
- Geocoding API
- Create credentials → API Key.
- Restrict the API key to your domain for security.
- Go to Mapbox Account.
- Create an account or sign in.
- Go to the Access Tokens section.
- Create a new token or use the default public token.
- Ensure it has the required scopes for your use case.
When deploying with Docker, add the environment variables to your docker-compose.yml:
services:
manager:
environment:
# set api key for the mapping service of choice. you need only one.
- GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here
- MAPBOX_API_KEY=your_mapbox_api_key_here- Never commit API keys to source code
- Use environment variables for all deployments
- Restrict API keys to specific domains/IPs when possible
- Rotate API keys regularly
- Monitor API usage for unexpected spikes
If maps are not loading:
- Check browser console for API key errors
- Verify environment variables are set correctly
- Ensure API keys have proper permissions/scopes
- Check API quotas and billing (for Google Maps)