Skip to main content
Version: 5.12

Fixed Variables

You can specify fixed variables with the value field. This cannot be used together with default in a single variable definition.

images:
database:
image: "mysql:${MYSQL_VERSION}"
vars:
- name: MYSQL_VERSION
value: "5.5"
- name: NAMESPACE
value: ${DEVSPACE_NAMESPACE}-suffix
# If you set 'default: my-value' and 'source: none' will be
# internally converted to 'value: my-value'.
# Both variable definitions below are handled exactly the same
- name: SOURCE_NONE
default: my-value
source: none
- name: SOURCE_NONE
value: my-value
OVERWRITING

If you want to overwrite a fixed variable, you can use the --var FIXED=new-value flag

Configuration#

name#

The name option expects a string stating the name of the config variable that will be used to reference it within the remainder of the configuration.

Must be unique

The name of a config variable must be unique and is mandatory when defining a config variable.

value#

The value option expects a string, integer or boolean defining the value for the variable. You can also use other variables in a value, with one of the following conditions being true:

  • The used variable is defined before the variable that wants to use it
  • The used variable is a predefined variable