Documentation Index
Fetch the complete documentation index at: https://mintlify.com/danizd/geoviable/llms.txt
Use this file to discover all available pages before exploring further.
All runtime configuration for GeoViable is managed through a single .env file in the project root. This file is read by Docker Compose and injected into both the geoviable-db and geoviable-api containers at startup. The repository ships an .env.example template with safe placeholder values — it contains no real secrets and is safe to commit. The actual .env file is listed in .gitignore and must never be committed.
Creating the file
Open the new .env file in your editor and replace the placeholder values with real ones before running docker compose up.
Variable Reference
Database
These variables are consumed by both the PostgreSQL container (to create the database and user on first start) and the FastAPI backend (to build the connection string).
| Variable | Default | Description |
|---|
POSTGRES_DB | geoviable | PostgreSQL database name |
POSTGRES_USER | geoviable | PostgreSQL username |
POSTGRES_PASSWORD | CHANGE_ME_SECURE_PASSWORD | PostgreSQL password — use a secure random value in production |
DATABASE_URL | postgresql+psycopg2://geoviable:CHANGE_ME_SECURE_PASSWORD@geoviable-db:5432/geoviable | Full SQLAlchemy connection string. The hostname must be geoviable-db (the Docker Compose service name) when running inside Docker. |
Never commit .env to version control if it contains real passwords. The .env.example file (with placeholder values) is safe to commit — .env itself is gitignored.
Application
| Variable | Default | Description |
|---|
ENVIRONMENT | production | Set to development for local work or production for live deployments |
LOG_LEVEL | INFO | Logging verbosity passed to Uvicorn and the application logger: debug, info, warning, error, or critical |
CORS_ORIGINS | https://geoviable.movilab.es | Comma-separated list of allowed CORS origins. For local development use http://localhost:3000,http://localhost:5173 |
Analysis Limits
These variables set the operational guardrails for the spatial analysis engine. They protect against large or malformed payloads that could cause slow PostGIS queries or excessive memory use.
| Variable | Default | Description |
|---|
MAX_POLYGON_AREA_KM2 | 100 | Maximum polygon area in km². Requests exceeding this are rejected before hitting the database. |
MAX_POLYGON_VERTICES | 10000 | Maximum number of vertices allowed in a single polygon |
MAX_UPLOAD_SIZE_MB | 5 | Maximum file upload size in MB, enforced in FastAPI middleware |
QUERY_TIMEOUT_SECONDS | 30 | PostGIS query timeout in seconds. Applied as a statement_timeout to every database session via the PGSTATEMENT_TIMEOUT environment variable in entrypoint.sh. |
Production Tips
Generate a cryptographically secure password for POSTGRES_PASSWORD with:Copy the output and use it for both POSTGRES_PASSWORD and the password portion of DATABASE_URL.
For a production deployment, your .env should include at minimum:
# Use a strong randomly generated password
POSTGRES_PASSWORD=<output of openssl rand -base64 32>
DATABASE_URL=postgresql+psycopg2://geoviable:<same password>@geoviable-db:5432/geoviable
# Set production mode (reduces debug output)
ENVIRONMENT=production
LOG_LEVEL=INFO
# Restrict CORS to your actual domain
CORS_ORIGINS=https://geoviable.movilab.es
For local development, relax CORS to allow both the production build served by Nginx and the Vite dev server:
ENVIRONMENT=development
LOG_LEVEL=debug
CORS_ORIGINS=http://localhost:3000,http://localhost:5173