Deployment

Development and production setup

Run locally with uv or Docker, then move to the Nginx + Certbot stack for HTTPS.

Stack FastAPI + SQLite

Local development (uv)

Best for code changes, quick debugging, and running tests.

uv venv
source .venv/bin/activate
uv pip install -e .

# run the app
uv run python main.py

# hot reload
openrsvp runserver --dev

# checks
uv run pytest
uv run ruff check
uv run ruff format
uv run pyright

Use openrsvp admin-token to fetch the root admin token and openrsvp seed-data for demo content.

Docker dev compose

Runs the container build with live reload enabled.

OPENRSVP_DATA_DIR=./data \
OPENRSVP_HOST_PORT=8000 \
docker compose -f docker-compose.dev.yml up --build

Browse http://localhost:8000. Override OPENRSVP_HOST_PORT to change the exposed port.

Production

Docker Compose with Nginx + Certbot

Uses docker-compose.yml to run the app behind Nginx with HTTPS certificates from Let's Encrypt.

  1. Point your domain A record to the host running Docker.
  2. Update deploy/nginx/default.conf with your domain in server_name and certificate paths.
  3. Bootstrap TLS (see the TLS card) before enabling the HTTPS server block.
  4. Start the stack and confirm the health check is reachable.
OPENRSVP_DATA_DIR=/srv/openrsvp/data \
docker compose up -d --build

The SQLite database lives inside OPENRSVP_DATA_DIR. Back up this directory regularly.

TLS

Certbot bootstrap and renewals

Nginx expects certs in deploy/certs. For the first run, you may need to comment out the HTTPS server block until certs exist.

docker compose run --rm certbot certonly \
  --webroot -w /var/www/certbot \
  -d your-domain.com \
  --email you@example.com --agree-tos --no-eff-email

After issuing certs, restore the HTTPS block (if removed) and restart Nginx:

docker compose up -d nginx

Schedule renewals (cron or systemd timer):

docker compose run --rm certbot renew
docker compose exec nginx nginx -s reload

You can also run openrsvp renew-certs to execute the same renewal + reload flow.

Keep ports 80 and 443 open so ACME challenges can succeed.

Admin

Root token

Fetch the root admin token inside the container.

docker compose exec app openrsvp admin-token

Store the token securely. It grants full visibility but still cannot edit guest RSVPs.

Updates

Rebuild and restart

Pull new code and rebuild the image.

git pull --ff-only
docker compose up -d --build

The data directory stays on the host, so restarts do not wipe events.

Checks

Health and logs

Confirm the app is reachable and the scheduler is running.

curl -I https://your-domain.com

docker compose logs --tail=200 app

Use docker compose logs -f during deploys to watch for errors.