Environment
Overview
The environment
subcommand helps to developers manage, deploy, and destroy their application environments.
Deploy
Deploys the application from the build output.
Usage
airbase deploy <environment>
Arguments
environment
: name of environment to deploy to (e.g.default
)
Options
--yes
: skips confirmation prompt, useful in CI/CD environments
Effects
Prints the URL of the deployed web application on Airbase
Uses .env.*
files for the environment variables. Read more about environment variables on Airbase.
? Deploy NextJS Hello World Template: template-nextjs-helloworld - default (production) Yes
Visit https://template-nextjs-helloworld.app.airbase.sg
Examples
Deploying to a preview environment
airbase deploy feat-1234-preview-changes
Deploying to a branch environment in GitLab CI/CD
airbase deploy ${CI_COMMIT_REF_SLUG} --yes
Destroy
Destroys the selected environment of the current application.
Usage
airbase destroy <environment>
Arguments
environment
: name of environment to deploy to (e.g.default
)
Options
--yes
: skips confirmation prompt, useful in CI/CD environments
Effects
💡
An extra confirmation step will be required when destroying a production environment.
? Destroy NextJS Hello World Template: template-nextjs-helloworld - default (production) Yes
? template-nextjs-helloworld will be destroyed. This action is irreversible.
Type the project handle (template-nextjs-helloworld) to confirm: nope
Project name does not match
Examples
Destroying a preview environment
airbase destroy feat-1234-preview-changes
Destroying a branch environment in GitLab CI/CD
airbase destroy ${CI_COMMIT_REF_SLUG} --yes
List
Lists the environments currently associated with the project and their identifiers.
Usage
airbase environment list
Sample Output
user@laptop template-nextjs-helloworld % airbase environment list
01H7HK8S834RX2PZJQHVNTTDQE default