A tiny note-taking app on Python · Flask. Write a note in Markdown, hit save, and it's rendered to HTML on the page — headings, lists, tables, blockquotes, and fenced code blocks with Pygments syntax highlighting. Newest notes first. Notes are stored in SQLite and survive redeploys.
Two things work together here:
-
App-local dependencies.
install:creates.venvwithpython3 -m venv --copies .venv, then installs the pinnedrequirements.txt. The service runs.venv/bin/gunicorn, without sudo or system pip changes. -
Workspace volume-backed persistence.
rig.yamldeclares adatavolume at/home/developer/dataand opts the app into it withvolumes: [data]. The SQLite DB lives at$DATA_DIR/markdown-notes.db, withDATA_DIRpointing at that mount. The synced app dir is wiped and re-rsynced on every deploy; the volume is not, so your notes stay put. The appmkdir -ps the dir at startup since a fresh workspace won't have it.
Rigbox stages app code and its virtual environment in a managed release directory. Unchanged dependency inputs reuse the existing installation. Activation briefly restarts the service; the workspace and its persistent volume remain in place.
cd markdown-notes && rig deployNo required env — DATA_DIR is set in rig.yaml.
- The page — write a note with a fenced code block and watch it render with syntax highlighting.
- The persisted in SQLite pill and the note count in the header card.
- Redeploy (
rig deploy) and confirm your notes are still there — that's thedatavolume surviving the rsync wipe.
- Persistence: yes. SQLite at
$DATA_DIR/markdown-notes.dbon thedataworkspace volume — durable across redeploys. - Health:
GET /healthz→{"ok": true}; the process binds0.0.0.0:8080under gunicorn. - Stack: Python · Flask, served by gunicorn (installed via the recipe
install:step).
The manifest uses workspace.deployment.strategy: incremental. Deployment stages app files separately from your editable checkout, then briefly restarts affected services on their original ports. The workspace, SSH sessions, and unrelated files stay in place. App rollback restores a retained release, not database contents or external side effects.
The explicit DATA_DIR=/home/developer/data uses the declared volume. Rigbox mounts a private app subdirectory there during installation and runtime. Existing legacy data at the volume root needs a reviewed migration into that subdirectory; deployment does not move or overwrite it.