← back to overview

Deployment guide

Connection map for the cdpr framework. The local checkout is the development workspace; GitHub is the source of truth; each external service redeploys from a single watched branch.

                    ┌────────────────────────────────────────────────┐
                    │                Local dev machine                │
                    │  ── editor + pytest + smoke_phase*.py + git ── │
                    └───────────────────────┬────────────────────────┘
                                            │ git push
                                            ▼
            ┌─────────────────────────────────────────────────────────┐
            │   GitHub:  Tachia/cdpr_simulator   (branch: main)       │
            │   CI:  .github/workflows/ci.yml   (lint + pytest)       │
            └──┬──────────────┬─────────────────┬────────────────┬────┘
               │              │                 │                │
        webhook ▼       webhook ▼          webhook ▼          webhook ▼
   ┌──────────────────┐ ┌──────────────┐ ┌────────────────┐ ┌─────────────┐
   │  Render          │ │  Streamlit   │ │  Cloudflare    │ │  Supabase   │
   │  cdpr-api        │ │  Community   │ │  Pages         │ │  (optional) │
   │  FastAPI         │ │  Cloud       │ │  docs/         │ │  metadata   │
   │  Dockerfile      │ │  streamlit_  │ │  index.html    │ │  + uploads  │
   │  render.yaml     │ │  app.py      │ │                │ │             │
   └──────────────────┘ └──────────────┘ └────────────────┘ └─────────────┘
            │                    │                                    ▲
            │ /simulate /workspace /plot /robots /health              │
            └────────────────────►◄─────────────────────────────────┘

What lives where

LayerHostingWhat's needed
FastAPI backendRender (Docker web service)Render account; connect to the GitHub repo; first deploy uses render.yaml
Streamlit consoleStreamlit Community CloudStreamlit account (free); point at streamlit_app.py, set CDPR_BACKEND_URL to the Render URL
Static docsCloudflare PagesCloudflare account; connect the repo; output directory docs/; no build command
StorageSupabase (optional)Supabase project; copy URL + service-role key into Render env
Local physicsMuJoCo on the dev machinepip install mujoco
CIGitHub ActionsConfigured at .github/workflows/ci.yml

Render — FastAPI backend

  1. Sign in at dashboard.render.com.
  2. New +Blueprint → connect this repo.
  3. Render reads render.yaml and proposes the cdpr-api web service.
  4. Confirm the build (Docker) and the /health check.
  5. Copy the public URL into the Streamlit env as CDPR_BACKEND_URL.

Streamlit Community Cloud — research console

  1. Sign in at share.streamlit.io.
  2. New app → this repo / main / streamlit_app.py.
  3. Under Advanced settings → Secrets, set CDPR_BACKEND_URL.

Cloudflare Pages — docs

  1. Sign in at dash.cloudflare.com → Workers & Pages.
  2. Create Pages application → Connect to Git → this repo.
  3. Framework preset: None; build command: empty; output dir: docs.

Supabase — persistent storage (optional)

  1. Sign in at supabase.com → New project.
  2. SQL editor → run supabase/schema.sql.
  3. Copy project URL + service-role key into Render env.

Development loop

edit src/cdpr/...
pytest tests/
git add ... && git commit
git push      # → GitHub Actions, Render, Streamlit, Cloudflare all rebuild