Aptible PaaS logoDocs
Reference

aptible config:set

This command sets Configuration variables for an App.

Synopsis

Usage:
  aptible config:set [VAR1=VAL1] [VAR2=VAL2] [...]

Options:
      [--app=APP]
      [--environment=ENVIRONMENT]
  -r, [--remote=REMOTE]

Examples

Setting variables

aptible config:set --app "$APP_HANDLE" \
        VARIABLE_1=VALUE_1 \
        VARIABLE_2=VALUE_2

Setting a variable from a file

📘 Setting variables from a file is a convenient way to set complex variables that contain spaces, newlines, or other special characters.
# This will read file.txt and set it as VARIABLE

aptible config:set --app "$APP_HANDLE" \
        "VARIABLE=$(cat file.txt)"
❗️ Warning: When setting variables from a file using PowerShell, you need to use Get-Content with the -Raw option to preserve newlines.
aptible config:set --app "$APP_HANDLE" \
        VARIABLE=$(Get-Content file.txt -Raw)

Deleting variables

To delete a variable, set it to an empty value:

aptible config:set --app "$APP_HANDLE" \
        VARIABLE=