Environments
An environment is a deployment target within a project — typically production, staging, or development. Each environment has its own infrastructure, secrets, domain, and deployment history.
Creating an environment
Section titled “Creating an environment”ske environment:create \ --project my-app \ --name production \ --provider aws \ --region us-east-1✓ Environment "production" createdEach environment is tied to a specific cloud provider and region. You can have environments on different providers — for example, staging on GCP and production on AWS.
Environment settings
Section titled “Environment settings”| Setting | Description |
|---|---|
name / slug |
Identifier for the environment |
cloud_provider_id |
Which connected provider to use |
region |
Cloud region for deployment |
network_id |
Optional VPC/network for private resources |
database_id |
Optional database instance |
cache_id |
Optional cache instance |
vanity_url |
Auto-generated URL for accessing the environment |
maintenance_mode |
Whether the environment is in maintenance mode |
protected |
Whether the environment requires elevated permissions to deploy |
Protected environments
Section titled “Protected environments”Mark an environment as protected to require additional permissions for deployment. This prevents accidental deploys to production by team members who only have staging access.
Environment isolation
Section titled “Environment isolation”Each environment is fully isolated:
- Separate container image version
- Separate secrets and environment variables
- Separate cloud resources (database, cache connections)
- Separate deployment history
- Separate custom domains
A deployment to staging never affects production. Rolling back one environment has no effect on others.
Configuration in ske.yml
Section titled “Configuration in ske.yml”Environments are configured in ske.yml:
name: my-appenvironments: production: region: us-east-1 memory: 1024 timeout: 30 concurrency: 100 staging: region: us-east-1 memory: 512 timeout: 60When your project has multiple environments, specify which one to target with --env:
ske deploy --env stagingIf ske.yml defines exactly one environment, the CLI uses it automatically without requiring --env.
Switching environments
Section titled “Switching environments”The --env flag works on any environment-scoped command:
ske secret list --env productionske deploy --env stagingske status --env productionYou can also set --project to target a different project entirely:
ske deploy --project api --env production