Skip to content

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.

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.

  1. Deploy the Frontend

    1. Create a new Web Service on Seenode and connect your repository.
    2. In the application’s settings, set the Root Directory to frontend.
    3. 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
  2. Deploy the Backend

    1. Create another new Web Service on Seenode and connect the same repository.
    2. In this application’s settings, set the Root Directory to backend.
    3. 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

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.