Docker Compose is the fastest way to run Rappi2. It starts three services together: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.
api (the FastAPI application), postgres (PostgreSQL 15), and mongodb (MongoDB 6.0). All data is persisted in named volumes so it survives container restarts.
Prerequisites
- Docker 24 or later
- Docker Compose v2 (bundled with Docker Desktop)
- Git
Setup
Configure environment variables
Copy the example file and edit the values for your environment:At minimum, set the following variables before starting:
The
| Variable | What to change |
|---|---|
POSTGRES_USER | PostgreSQL username (default: postgres) |
POSTGRES_PASSWORD | PostgreSQL password (default: postgres) |
POSTGRES_DB | Database name (default: rappi2) |
MONGO_USER | MongoDB root username (default: admin) |
MONGO_PASSWORD | MongoDB root password (default: admin) |
SECRET_KEY | JWT signing secret — must be changed for any non-development environment |
ORS_API_KEY | Your OpenRouteService API key for route planning |
DATABASE_URL and MONGO_URL values in .env are used by Alembic and scripts running outside Docker. Inside the api container, Docker Compose injects these automatically using the service hostnames postgres and mongodb.Build and start the stack
api image, pull postgres:15-alpine and mongo:6.0, and wait for both databases to pass their health checks before starting the API.Seed initial data
Create the default roles, permissions, and admin user:This creates the
Admin, Despachador, Conductor, and Cliente roles, assigns wildcard permissions to Admin, and creates the user admin with password admin123.Useful commands
The API is available at http://localhost:8000. Interactive API documentation (Swagger UI) is at http://localhost:8000/docs and the ReDoc view is at http://localhost:8000/redoc.