Skip to main content

Documentation 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.

Rappi2 is configured entirely through environment variables, loaded from a .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

VariableDefaultDescription
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_DBrappi2_mongoMongoDB database name used by the application
SECRET_KEYsupersecretkey_please_change_in_productionKey used to sign and verify JWT tokens (HS256). Must be a long random string in any non-development environment
ACCESS_TOKEN_EXPIRE_MINUTES15Lifetime of access tokens in minutes
REFRESH_TOKEN_EXPIRE_DAYS7Lifetime of refresh tokens in days
AUDIT_ENABLEDtrueWhen true, every HTTP request is logged to the auditoria MongoDB collection
ORS_API_KEYyour_ors_api_key_hereAPI 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 the postgres and mongodb services are initialised. They are used to build DATABASE_URL and MONGO_URL inside the containers automatically.
VariableDefaultDescription
POSTGRES_USERpostgresPostgreSQL superuser username
POSTGRES_PASSWORDpostgresPostgreSQL superuser password
POSTGRES_DBrappi2PostgreSQL database to create on first run
MONGO_USERadminMongoDB root username
MONGO_PASSWORDadminMongoDB root password
SECRET_KEY must be changed from its default value in any non-development environment. Tokens signed with the default key can be forged by anyone who knows it. Generate a secure value with:
openssl rand -hex 32
CORS_ORIGINS accepts either a comma-separated string or a JSON array. Both of the following are valid:
# Comma-separated
CORS_ORIGINS=https://app.example.com,https://admin.example.com

# JSON array
CORS_ORIGINS=["https://app.example.com","https://admin.example.com"]
The default value * allows requests from any origin. Restrict this before going to production.

Build docs developers (and LLMs) love