ToDoRabbit ships as two containers: the FastAPI backend and an nginx container that serves the built frontend and proxies /api to the backend.
docker compose up --build -dThe frontend is available on port 3000 and the API on port 8000. Check that the backend is healthy:
curl http://localhost:8000/api/healthBy default the SQLite file lives inside the backend container and is lost when the container is recreated. Mount a volume and point DATABASE_URL at it:
services:
backend:
environment:
- DATABASE_URL=sqlite+aiosqlite:////data/todos.db
volumes:
- todo-data:/data
volumes:
todo-data:Save this as docker-compose.override.yml next to docker-compose.yml, and Compose picks it up automatically.
If you serve the frontend from your own domain, add it to CORS_ORIGINS on the backend, for example CORS_ORIGINS=["https://todos.example.com"]. See configuration for all settings.
git pull
docker compose up --build -dCompose rebuilds only the images whose inputs changed.