Monorepo Tool

Generate monorepo commands

Fill in your global settings and add each subfolder of your monorepo. Commands are generated for every app automatically.

Monorepo subfolders

VPS — one-time setup per app

Run once on the server for each app to create it, assign a subdomain, enable HTTPS, and mount persistent storage.

Add subfolders above to generate commands.
dokku ports:set maps the public http/https ports to the container's internal port (3000). Set DATABASE_URL=/app/storage/db.sqlite via the Env Tool.

Local — add git remotes

Add one Dokku remote per app. Run this once from the monorepo root.

Add subfolders above to generate commands.
Each remote has a unique name (e.g. dokku-my-app-web) so pushes never go to the wrong app.

Local — deploy (subtree push)

Push only each app's subdirectory to its Dokku remote. Dokku receives it as if it were the full repo root and runs the Dockerfile there.

Add subfolders above to generate commands.
git subtree push rewrites history so only commits that touched the app's path are sent. You can wrap the full deploy line into a npm run deploy:<name> script.

Option B — push full repo (all apps, with Dockerfile path)

If you push the entire repo instead of a subtree, set the Dockerfile path on the VPS for each app. Then push once and all apps rebuild from the same push.

Add subfolders above to generate commands.
See Monorepo Guide for the trade-offs between Option A (subtree) and Option B (full repo push).