Skip to main content

Configuration Reference

This page describes all the environment configuration options for both the backend and frontend components of stac-gis.


Backend Configuration (backend/stacgis/.env)

The backend is configured via a standard .env file located in the root of the backend directory.

Database Settings

  • DATABASE_URL: SQLAlchemy-compatible connection string.
    • Example: postgresql+asyncpg://postgres:postgres@db:5432/stacgis
  • DATABASE_POOL_SIZE: Max connection pool size (default: 20).
  • DATABASE_MAX_OVERFLOW: Max overflow connections allowed (default: 10).

Caching and Message Broker (Redis)

  • REDIS_URL: Redis client URL.
    • Example: redis://redis:6379/0
  • CELERY_BROKER_URL: Celery broker URL (usually Redis).
    • Example: redis://redis:6379/1
  • CELERY_RESULT_BACKEND: Celery result store.
    • Example: redis://redis:6379/1

Security and Authentication

  • JWT_SECRET_KEY: High-entropy key used to sign JWT authentication tokens.
  • JWT_ALGORITHM: Crypto algorithm used to encrypt tokens (default: HS256).
  • ACCESS_TOKEN_EXPIRE_MINUTES: Expiration time for access token (default: 30).
  • REFRESH_TOKEN_EXPIRE_DAYS: Expiration time for refresh token (default: 7).

Object Storage (MinIO / S3)

  • MINIO_ENDPOINT: URL endpoint of the MinIO / S3 API (default: minio:9000).
  • MINIO_ACCESS_KEY: Access user key.
  • MINIO_SECRET_KEY: Secret passcode key.
  • MINIO_SECURE: Bool flag for SSL (set false for local docker setups).
  • MINIO_BUCKET_NAME: Default bucket name for GIS datasets.

AI Agent Settings

  • OLLAMA_API_BASE: Endpoint for the local Ollama LLM provider.
    • Example: http://ollama:11434
  • OLLAMA_MODEL: Target model used for agent reasoning (default: qwen2.5-coder:7b or llama3).
  • EMBEDDING_MODEL: Target embedding model (default: nomic-embed-text).

Frontend Configuration

The frontend apps use Vite's built-in environment support. Environment variables must be prefixed with VITE_ to be exposed to client-side code.

Main App (frontend/apps/stacgis/.env)

  • VITE_API_URL: Root path or host for backend endpoint routers.
    • Example (Nginx proxy dev): /api/v1
    • Example (Direct API endpoint dev): http://localhost:8000/api/v1
  • VITE_MAPBOX_TOKEN: Mapbox GL JS API key (optional, falls back to open-source OpenStreetMap/Leaflet raster tiling if not provided).