Monorepo Multiple Apps Hosting: Deploy Every Service From One Git Repo
Monorepo multiple apps hosting deploy is one of the trickiest workflows to get right — most platforms assume one repo equals one app. CM Cloud App Hosting is built differently: you can deploy each service in a monorepo as a separate app, each with its own deploy hook, runtime, and environment. Here is how to set it up.
What Is a Monorepo and Why Does It Complicate Hosting?
A monorepo is a single Git repository that contains multiple distinct applications or services — for example, a Next.js frontend, a FastAPI backend, and a PocketBase data layer, all living under one root.
Traditional hosts expect one repo → one site. Monorepos break that assumption because you need each subdirectory to deploy independently, trigger on different file changes, and run on potentially different runtimes.
The solution is to treat each service as its own app deployment, pointed at the same repo but configured to build and run from its own subdirectory.
How CM Cloud App Hosting Handles Monorepos
CM Cloud App Hosting gives you one app slot per subscription (starting at $7.99/mo — XAF 5,000 / €7.40). For a monorepo with three services, you create three separate App Hosting subscriptions — one per service.
Each app:
– Gets its own CI/CD deploy hook URL generated in the portal
– Runs its own runtime (Node.js, Python, Laravel/PHP, or PocketBase)
– Has its own environment variables
– Receives pushes independently via GitHub Actions
CM Cloud manages the full runtime layer — nginx, systemd, process supervision — so you push code and the platform handles the rest. There is no customer SSH access; the platform is fully managed.
Step-by-Step: Deploying a 3-Service Monorepo
Assume your monorepo looks like this:
my-monorepo/
frontend/ ← Next.js
api/ ← FastAPI
backend/ ← PocketBase
Step 1 — Create Three App Hosting Subscriptions
In the CM Cloud portal, create three App Hosting apps:
– my-app-frontend → runtime: Node.js / Next.js
– my-app-api → runtime: Python / FastAPI
– my-app-backend → runtime: PocketBase
Each subscription is $7.99/mo (XAF 5,000 / €7.40). See cmcloudhosting.com/pricing for the current plan details.
Step 2 — Grab Each App’s Deploy Hook URL
For each app, the portal generates a unique secret deploy hook URL. Copy all three — you will use them in GitHub Actions.
Step 3 — Add Deploy Hook Secrets to GitHub
In your GitHub repo settings → Secrets and variables → Actions, add:
– DEPLOY_HOOK_FRONTEND
– DEPLOY_HOOK_API
– DEPLOY_HOOK_BACKEND
Step 4 — Write a Selective GitHub Actions Workflow
The key to a monorepo CI/CD setup is path filtering — only trigger a deploy when files in that service’s directory actually changed.
name: Monorepo Deploy
on:
push:
branches: [main]
jobs:
deploy-frontend:
if: contains(github.event.commits[0].modified, 'frontend/')
runs-on: ubuntu-latest
steps:
- name: Trigger CM Cloud Frontend Deploy
run: curl -X POST ${{ secrets.DEPLOY_HOOK_FRONTEND }}
deploy-api:
if: contains(github.event.commits[0].modified, 'api/')
runs-on: ubuntu-latest
steps:
- name: Trigger CM Cloud API Deploy
run: curl -X POST ${{ secrets.DEPLOY_HOOK_API }}
deploy-backend:
if: contains(github.event.commits[0].modified, 'backend/')
runs-on: ubuntu-latest
steps:
- name: Trigger CM Cloud Backend Deploy
run: curl -X POST ${{ secrets.DEPLOY_HOOK_BACKEND }}
For production use, replace the simplified contains check with the dorny/paths-filter action for accurate directory-level filtering.
Step 5 — Configure Each App’s Start Command
In each app’s settings, set the start command to reference the correct subdirectory:
– Frontend: cd frontend && npm run start
– API: cd api && uvicorn main:app --host 0.0.0.0 --port 8000
– Backend: cd backend && ./pocketbase serve --http 0.0.0.0:8090
CM Cloud’s systemd process supervisor picks up the start command and keeps the process alive automatically.
Environment Variables Per Service
Each app subscription has its own environment variables panel. Set service-specific secrets without exposing them across apps. For example:
– Frontend: NEXT_PUBLIC_API_URL, NEXT_PUBLIC_PB_URL
– API: DATABASE_URL, SECRET_KEY
– Backend (PocketBase): PB_ENCRYPTION_KEY
For a deeper guide on managing secrets safely, see the published article on App Hosting environment variables — it covers production-safe patterns for every runtime CM Cloud supports.
Database: Connect Your Own External DB
CM Cloud App Hosting does not bundle a database. Each service connects to an external database of your choice — PostgreSQL on Neon, Supabase, PlanetScale, or your own Cloud VPS running Postgres.
PocketBase is the exception: it runs SQLite internally and handles auth, realtime, and file storage without a separate DB subscription. It is the most self-contained service in any monorepo stack.
Pricing Comparison: Monorepo App Hosting Platforms
| Provider | Starter Price (USD) | XAF | EUR | Monorepo / Multi-App Support |
|---|---|---|---|---|
| CM Cloud App Hosting | $7.99/mo per app | XAF 5,000 | €7.40 | Yes — one deploy hook per app, GitHub Actions path filtering |
| Railway | ~$5/mo usage-based | ~XAF 3,100 | ~€4.60 | Yes — per-service deployments, usage billing |
| Render | $7/mo per service | ~XAF 4,350 | ~€6.50 | Yes — monorepo supported, free tier cold starts |
| Vercel | $0 (free) / $20 pro | ~XAF 12,500 | ~€18.50 | Frontend only — no backend runtimes |
CM Cloud is the only option in this table that simultaneously offers African-market pricing in XAF, managed runtimes (no SSH required), and support for backend runtimes including Python, Laravel, and PocketBase — not just frontend frameworks.
See the full plan breakdown at cmcloudhosting.com/pricing.
Runtimes Available for Monorepo Services
Each app in your monorepo can use a different runtime:
| Runtime | Frameworks Supported |
|---|---|
| Node.js | Express, Next.js |
| Python | FastAPI, Django, Flask |
| PHP | Laravel |
| PocketBase | Full-stack auth + realtime backend |
Mix and match — your frontend can be Next.js while your API is FastAPI and your auth layer is PocketBase, all deployed from the same repository.
Important Limitations to Know
- No rollback feature — if a bad deploy goes out, redeploy a fixed commit via the hook. Keep your Git history clean.
- No bundled database — provision an external DB for any service that needs relational storage (PocketBase excluded).
- No SSH access — CM Cloud manages the runtime layer entirely. Configure everything through environment variables and start commands in the portal.
- One subdomain per app — each app gets its own domain/subdomain assignment. You can point custom domains at each.
Who Should Use This Setup?
This workflow is ideal for:
– Startups building a full-stack product with a shared codebase
– Agencies managing multiple client microservices from one repo
– Developers in Cameroon and West Africa who want managed infrastructure without paying DigitalOcean or Railway prices in USD with no local currency option
– Solo developers who want CI/CD without configuring servers
Get Started
Deploy your first monorepo service on CM Cloud App Hosting from $7.99/mo (XAF 5,000 / €7.40). Create one app per service, grab each deploy hook, and wire up GitHub Actions path filters — you have a production monorepo CI/CD pipeline in under an hour.
👉 View App Hosting plans at cmcloudhosting.com/pricing and deploy your first service today.