Rappi2 is configured entirely through environment variables, loaded from aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JorLOrT/rappi2/llms.txt
Use this file to discover all available pages before exploring further.
.env file at startup via pydantic-settings. Copy .env.example to .env and adjust the values before running the application. Variables set in the shell or in docker-compose.yml take precedence over the .env file.
Variable reference
| Variable | Default | Description |
|---|---|---|
DATABASE_URL | (required) | PostgreSQL connection string in SQLAlchemy async format, e.g. postgresql+asyncpg://user:pass@host:5432/dbname |
MONGO_URL | (required) | MongoDB connection URI, e.g. mongodb://user:pass@host:27017/ |
MONGO_DB | rappi2_mongo | MongoDB database name used by the application |
SECRET_KEY | supersecretkey_please_change_in_production | Key used to sign and verify JWT tokens (HS256). Must be a long random string in any non-development environment |
ACCESS_TOKEN_EXPIRE_MINUTES | 15 | Lifetime of access tokens in minutes |
REFRESH_TOKEN_EXPIRE_DAYS | 7 | Lifetime of refresh tokens in days |
AUDIT_ENABLED | true | When true, every HTTP request is logged to the auditoria MongoDB collection |
ORS_API_KEY | your_ors_api_key_here | API key for OpenRouteService, used for route planning |
CORS_ORIGINS | ["*"] | Allowed CORS origins. Accepts a comma-separated string or a JSON array |
Additional Docker Compose variables
When deploying with Docker Compose, the following variables control how thepostgres and mongodb services are initialised. They are used to build DATABASE_URL and MONGO_URL inside the containers automatically.
| Variable | Default | Description |
|---|---|---|
POSTGRES_USER | postgres | PostgreSQL superuser username |
POSTGRES_PASSWORD | postgres | PostgreSQL superuser password |
POSTGRES_DB | rappi2 | PostgreSQL database to create on first run |
MONGO_USER | admin | MongoDB root username |
MONGO_PASSWORD | admin | MongoDB root password |
CORS_ORIGINS accepts either a comma-separated string or a JSON array. Both of the following are valid:* allows requests from any origin. Restrict this before going to production.