A project in Compartment represents a single Git repository. When you runDocumentation Index
Fetch the complete documentation index at: https://docs.compartment.dev/llms.txt
Use this file to discover all available pages before exploring further.
compartment init in a repository, Compartment reads the name field from the generated compartment.yml and registers that value as the project’s unique slug on the platform. Every subsequent deploy from that repo is associated with the same project, giving you a stable home for all its services, environments, and deployment history.
Project names
Project names are the primary identifier for a project across the CLI and the API. They must match the pattern^[a-z][a-z0-9-]{0,62}$, which means:
- starts with a lowercase letter
- contains only lowercase letters, digits, and hyphens
- is at most 63 characters long
compartment.yml at the root of your repository:
compartment.yml
What a project contains
Each project groups together everything needed to run your application:- Services — the individual deployable units defined under
services:incompartment.yml - Environments — named deployment targets such as
productionandstaging, each with isolated deployments and variables - Deployment history — a record of every build-and-run attempt for each service in each environment
compartment.yml
A project must define at least one service. The
compartment.yml schema rejects descriptors with an empty services map.Project lifecycle
Projects move through a simple lifecycle: they start active, can be archived to remove them from the default project list, and can be permanently deleted when no longer needed.Create a project
Run
compartment init in your repository root. Compartment scaffolds a compartment.yml with a name matching your chosen project slug and registers the project on the platform when you first run compartment deploy.List projects
Run
compartment project list to see all active projects in your organization. Pass --include-archived to include archived projects.Inspect a project
Run
compartment project show inside a repository, or compartment project show --project <name> anywhere, to see the project’s current remote state and the path to the local descriptor file.Rename a project
Run
compartment project rename <new-name> to change the project’s slug. The new name must satisfy the same naming pattern. Update your compartment.yml name field to match so future deploys continue to resolve correctly.Archive a project
Run
compartment project archive <name> to hide a project from the default list without deleting its history. Archived projects can be restored with compartment project unarchive <name>.What compartment.yml owns and does not own
The compartment.yml file is intentionally scoped. Understanding its boundaries helps you know where to look for different kinds of configuration.
compartment variable. Browser-facing rewrites and proxy rules live in a companion file, compartment.routes.yml.
Next steps
Services
Learn how to define and configure the individual deployable units inside a project.
Environments
Understand how environments isolate deployments and variables across stages.
compartment.yml reference
Full reference for every field in the
compartment.yml descriptor.Deploy your first app
Step-by-step guide to creating a project and shipping your first deployment.