Using Monorepos
Monorepos are an excellent way to manage multiple projects within a single directory, making it easier to organize and work with your codebase. Epycbyte provides robust support for monorepos, allowing you to deploy them quickly and efficiently.
Table of Contents
- Getting Started
- Deploying a Template Monorepo
- Adding a Monorepo Through the Epycbyte Dashboard
- Using the Epycbyte CLI
- When Do Monorepo Builds Occur?
- Ignoring the Build Step
- Skipping Unaffected Projects
- Requirements
Getting Started
Monorepos simplify project management by consolidating your codebase into a single repository. With Epycbyte, you can easily set up and manage monorepos to streamline your workflow.
Deploying a Template Monorepo
Epycbyte offers pre-configured templates for monorepos, making it simple to get started. Follow these steps:
- Select Your Team: Ensure you're logged in and have the necessary permissions.
- Create a New Project: Navigate to the project creation section and choose "Monorepo" as your template type.
- Configure Settings: Set up your repository with the required configurations, such as root directories and build settings.
- Deploy: Click "Deploy" to create your monorepo project.
Epycbyte's templates are designed for quick deployment, allowing you to start managing multiple projects in minutes.
Adding a Monorepo Through the Epycbyte Dashboard
To add a monorepo manually:
- Select Your Team: Ensure you're working within the correct team settings.
- Create a New Project: Click on "Add Project" and select "Monorepo."
- Import Your Repository: Enter your Git repository details to clone it into Epycbyte.
- Set Root Directories: Define which directories will be included in your monorepo.
- Configure Settings: Adjust build triggers, concurrency settings, and other configurations as needed.
- Deploy: Save your changes and deploy the project.
Using the Epycbyte CLI
Epycbyte provides a command-line interface (CLI) for managing monorepos. Here's how to use it:
- Install the CLI: Download and install the Epycbyte CLI from the official website.
- Log In: Use
epycbyte loginto log in to your account. - Link Projects: To link a project, run
epycbyte link --repo <project-name>. - Clone Repositories: Use
epycbyte cloneto clone repositories into your monorepo structure.
When Do Monorepo Builds Occur?
By default, any push or pull request to your monorepo will trigger a build. Epycbyte automatically builds all connected projects based on the defined rules.
Ignoring the Build Step
If you want to skip a build for specific branches or files, use the "Ignore Build" feature in project settings:
- Go to Project Settings: Navigate to the "Settings" tab and select "General."
- Enable Ignore Build: Toggle the switch next to "Ignore Build" to disable automatic builds.
- Save Changes: Apply your changes and confirm that builds will be skipped for selected branches.
Skipping Unaffected Projects
Epycbyte allows you to skip building projects that don't require updates:
- Go to Project Settings: Navigate to the "Settings" tab and select "General."
- Enable Skip Deployment: Toggle the switch next to "Skip Deployment" to enable this feature.
- Save Changes: Apply your changes, and Epycbyte will automatically skip building unaffected projects.
Requirements
For optimal performance:
- Package Manager: Use npm, yarn, or pnpm with a lockfile at the root of your repository.
- Unique Package Names: Ensure each package in your monorepo has a unique name in its
package.jsonfile. - Explicit Dependencies: Clearly define dependencies between packages in their respective
package.jsonfiles.
Additional Notes
- Error Handling: Monitor build logs for errors and resolve issues promptly.
- Release Phases: Use release phases to manage rollouts and deployments.
- Private Registry Support: Epycbyte supports private registries for secure package management.
- Glossary: Refer to the glossary for detailed explanations of terms and features.