Deploy Env Files with Reis (Flag Mode)

Deploy .env-style files to Bahriya with Reis flags: create from a content file, rotate, list versions, activate a previous one, and attach to projects.

Updated 31 Oct 20262 min read

Use the Reis CLI to manage .env-style files using command-line flags. Env files are key=value pairs (one per line) that get mounted into a container at a path of your choosing.

Create an env file

reis env_file:create \
  --org <organisation-id> \
  --name "App Env" \
  --handle app-env \
  --content_file ./config/app.env

List env files

reis env_file:list --org <organisation-id>

Shows a table with handle, name, and creation date for each env file, plus its current version (for example v2 of 3) and when it was last rotated (Never until the first rotation).

Show an env file

reis env_file:show <env-file-id> --org <organisation-id>

Rotate (update content)

reis env_file:rotate <env-file-id> \
  --org <organisation-id> \
  --content_file ./config/app-v2.env

List versions

reis env_file:versions <env-file-id> --org <organisation-id>

Activate a previous version

reis env_file:activate <env-file-id> <version-number> --org <organisation-id>

Note: env files use env_file:activate (without the _version suffix). The other config types use *:activate_version.

Delete an env file

reis env_file:delete <env-file-id> --org <organisation-id>

Add --force to skip the confirmation prompt.

Required flags for create

FlagDescription
--nameHuman-readable display name
--handleDNS-1123-compliant identifier (auto-generated from name if omitted)
--content_filePath to a file containing KEY=value lines

Attach to a project

reis project:attach <project-id> env_files app-env

Singular alias env_file is also accepted. The project-id is the UUID Reis returns from project:list or project:show.

Detach from a project

reis project:detach <project-id> env_files app-env

If a running container still mounts the env file, detach is rejected with a 409 naming the blocking container — tear it down (or remove its env_files block) and retry.

See also