Monorepos are becoming increasingly common.
One Git repository might contain:
apps/ web/ admin/ api/
packages/ ui/ database/ config/
This is convenient for development.
But deployment introduces a question:
Which folder should actually be deployed?
You Don't Always Need the Whole Repository
Imagine your repository contains three applications.
You don't want every deployment to build all three.
Your frontend may live in:
apps/web
while your API lives in:
apps/api
Each can have its own deployment configuration.
Root Directory Solves the Problem
The deployment system needs to know where the application lives.
For example:
Root directory: apps/web Build command: npm run build Start command: npm start
Now the deployment process can work with the correct application instead of treating the entire repository as one project.
Hostwares supports a configurable root directory specifically for deployments from monorepos.
Why This Is Useful
You can keep related applications together while deploying them independently.
For example:
GitHub Repository ↓ ┌───────────────┐ │ │ Web API │ │ Deployment A Deployment B
This keeps the repository organized without forcing every application to share the same deployment lifecycle.
Watch Your Dependencies
Monorepos can introduce another issue.
A package used by multiple applications may need to be built or copied correctly.
Make sure your build command understands your workspace structure.
Don't Let Repository Structure Dictate Infrastructure
A large repository doesn't necessarily require complicated hosting.
The important thing is identifying:
Which directory is the application Which dependencies it needs Which build command it uses Which port it exposes Which environment variables it requires
Once those are clear, deployment becomes much simpler.
A monorepo can contain many projects. Your deployment only needs to run the one you're actually shipping.