Environment

up environment

Manage environments

Synopsis

Environments are isolated namespaces within a project. Each environment gets its own Docker network and its own scoped named volumes, so two environments of the same project never share state.

Create an environment on a deploy node, move it to another node with set-node, or remove it. Removing an environment cascades to its services and deployments.

Run up environment with no subcommand to list environments. Pass –all to list every project’s environments instead of one project’s.

up environment [flags]

Options

      --all              list environments across all projects
  -f, --file string      path to config file (default "up.yaml")
  -p, --project string   project name or ID

Options inherited from parent commands

  -o, --output string   output format: table, json, yaml (list commands only) (default "table")
  -q, --quiet           suppress output
  -v, --verbose count   enable debug output (-v debug, -vv trace)

up environment create

Create an environment on a deploy node

Synopsis

Create an environment and place it on a deploy node. The environment gets a dedicated Docker network and scoped volumes on that node. Pass –node to choose the deploy node; when omitted the control node auto-selects an available deploy node. Pass –preview to mark the environment as an ephemeral preview environment for a pull request.

up environment create <name> [flags]

Examples

  # Create a staging environment on the edge-1 node
  up environment create staging --node edge-1

  # Auto-select a deploy node
  up environment create staging

  # Create a preview environment for pull request 42
  up environment create pr-42 --preview

Options

      --if-not-exists   return the existing environment instead of failing when the name is taken
      --node string     deploy node name or ID (default: auto-select)
      --preview         mark the environment as a preview environment

up environment list

List environments for a project

Synopsis

List the environments in a project as a table. This is the default action when up environment is run with no subcommand.

up environment list [flags]

up environment remove

Remove an environment (–force also removes its services)

Synopsis

Remove an environment. By default this fails if the environment still has services; pass –force to also remove those services and their deployments.

Pass the name, or omit it to pick from a list.

up environment remove <name> [flags]

Examples

  # Remove an environment and its services
  up environment remove staging --force

Options

      --force   skip confirmation and force removal

up environment set-node

Change the deploy node for an environment

Synopsis

Move an environment to a different deploy node. The environment’s network and volumes are recreated on the new node. The –node flag is required and names the target deploy node.

up environment set-node <name> [flags]

Examples

  # Move the staging environment to the edge-2 node
  up environment set-node staging --node edge-2

Options

      --node string   deploy node name or ID (required)