Deploying from a Monorepo
If your repository contains multiple projects (a “monorepo”), you need to tell Seenode where your application’s code is located. The Root Directory setting allows you to specify a subdirectory within your repository to be used for a deployment.
By default, Seenode runs build and start commands from the root of the repository. If your application is in a subfolder, you must provide the relative path to that folder in the Root Directory setting.
Example Monorepo Structure
Section titled “Example Monorepo Structure”Consider a monorepo with a frontend and a backend application:
Directory/my-cool-project
Directory/frontend
- package.json
Directorysrc/
- …
Directory/backend
- requirements.txt
- main.py
To deploy these as two separate services on Seenode, you would create two applications and configure the Root Directory for each.
-
Deploy the Frontend
- Create a new Web Service on Seenode and connect your repository.
- In the application’s settings, set the Root Directory to
frontend
. - Configure the build and start commands as needed for your frontend framework. For example, for a React app:
- Build Command:
npm install && npm run build
- Start Command:
npm start
- Build Command:
-
Deploy the Backend
- Create another new Web Service on Seenode and connect the same repository.
- In this application’s settings, set the Root Directory to
backend
. - Configure the build and start commands for your backend. For a Python app:
- Build Command:
pip install -r requirements.txt
- Start Command:
python main.py
- Build Command:
By setting the Root Directory, you ensure that Seenode runs all commands within the correct context for each application, allowing you to easily manage multiple services from a single repository.