Env

Manage environment variables, locally or on a deployed target. Locally they live in the .env file at the project root; on a server they live in /etc/vela/apps, readable only by root, and never travel inside a release.

Syntax

$ vela env <command>
  • list - List environment variable names
  • set - Set an environment variable
  • unset - Remove an environment variable
  • import - Merge a dotenv file into the environment

Targets

Unlike the deploy commands, vela env defaults to -t local. Name a target to work on a server instead:

$ vela env list                    # this machine's .env
$ vela env list -t production      # the production server
$ vela env list -t staging

Options

Every subcommand takes the same target and connection options:

  • -t, --target <target> - Which copy of the app to act on, defaults to local
  • --server <ssh> - Server this target runs on, recorded on first use
  • -i, --identity <file> - SSH private key to authenticate with
  • --ssh-port <port> - SSH port
  • --accept-host-keys - Trust an unknown host key on first connect (CI)

Deploys never touch them

vela deploy does not read, upload or overwrite the environment on a server. Production secrets are set once with these commands and stay put across releases. Anything the build needs, as opposed to the running app, has to exist wherever the build runs.