Mono Repos

Learn more about how to setup your applications with a mono repo.

If you are managing your source code through mono repos, the recommended way is to create a Nodion application for every project that is part of your mono repo and is you would like to deploy to our platform. For example if your mono repo has two directories, one called "api" (which is used for your backend) and one called "app" (which is used for your frontend) you are able to create two Nodion applications.

Nodion allows to provide a so called prepend directory, which means that building your images when deploying will not happen in the root directory but instead in the provided prepend directory, which becomes the new root directory for this specific Nodion application.

Example 1: Deploying an API with a Dockerfile

If you have structured your mono repo in a way that your API is sitting in an "api" subdirectory, you have to set /api as prepend directory within the Nodion application settings.

Example 2: Deploying an API with a Dockerfile called Dockerfile.prod

If you have structured your mono repo in a way that your API is sitting in an "api" subdirectory, you have to set /api as prepend directory within the Nodion application settings. Additionally, since the Dockerfile is not called Dockerfile but Dockerfile.prod, you have to set an environment variable NODION_DOCKERFILE_PATH with the value Dockerfile.prod as described in the Docker section of our docs.

Example 3: Deploying an API with Buildpacks

As with example 1 and 2 you have to set /api as prepend directory within the Nodion application settings.