This guide walks you through deploying your first application with Compartment. It assumes you already have Compartment installed on a server and theDocumentation 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 CLI available on your machine. If you haven’t installed Compartment yet, start with the installation guide.
Log in to Compartment
Authenticate the CLI against your Compartment installation. Run the following command and enter the email address and password for your Compartment admin account when prompted.On success, the CLI prints your email and the organization you’re logged into:The CLI saves your session locally so you don’t need to log in again for subsequent commands. You can pass
--email to skip the email prompt:Initialize your project
From the root of your repository, run The CLI prompts you for a project name, suggesting the current directory name as a default. You can also pass The generated This defines a single service named
compartment init. This creates a compartment.yml file that links your repository to a Compartment project and defines your first service.--name to skip the prompt:compartment.yml looks like this:web whose source is the repository root (.). Compartment will auto-detect your build toolchain using Railpack. You can edit this file to add more services, set a custom build command, configure readiness checks, and more — see the compartment.yml reference.Deploy your app
Run You’ll see build and readiness progress in your terminal. To target a specific environment, use To deploy a single service in a multi-service project, use When the deployment finishes, the CLI prints a summary including the live URL for your app.
compartment deploy from the same directory as your compartment.yml. Compartment uploads your project descriptor, builds your services on the platform, and promotes them to live traffic once they pass readiness checks.--env:--service:Next steps
Now that your first app is live, explore what else Compartment can do:Multi-service apps
Add more services to your
compartment.yml and deploy them as a single unit.Environment variables
Manage plain and secret variables scoped to environments or services.
Zero-downtime deploys
Understand how Compartment promotes candidates and how to roll back.
compartment.yml reference
Configure build strategies, readiness checks, and access modes.