Installation¶
LightningROD runs as a Docker Compose stack with two services: the web application and PostgreSQL.
Requirements¶
- Docker and Docker Compose
- A CSV export of your charging history (optional, for seeding data)
Docker Compose¶
The app will be available at http://localhost:8000 (or your configured APP_PORT).
What Happens on Startup¶
The container's entrypoint script handles setup automatically:
#!/bin/bash
set -e
echo "Running Alembic migrations..."
uv run alembic upgrade head
echo "Starting LightningROD..."
exec uv run uvicorn web.main:app --host 0.0.0.0 --port 8000
- Alembic runs all pending database migrations
- Uvicorn starts the FastAPI application
Note
The web service waits for PostgreSQL to pass its health check before starting. If the database is slow to initialize on first run, the web container will retry until it's ready.
Verify It's Running¶
You should see both db and web services running. Open http://localhost:8000 in your browser.
The database starts empty. See Data Import to load your charging history.
Stopping and Restarting¶
Your data is stored in a named Docker volume (pgdata) and persists across restarts and rebuilds.
Updating¶
Migrations run automatically on startup, so schema changes are applied when you update.