Skip to main content

How to Change and Deploy the Environment Variables?

Applications can run in different configurations in various projects. For example, an application can work in two different projects with different default languages. For such requirements, the Environment Parameters feature of Akinon Commerce Cloud is used. These parameters can be seen in the ENV Variables column when listing applications.

$ akinoncli projectapp add-env --deploy {project_id} {project_app_id} {ENV_KEY}={ENV_VALUE} {ANOTHER_ENV_KEY}={ANOTHER_ENV_VALUE}

Environment Parameters

Adds the environment parameter on the application.

project_idProject IDYes
project_app_idApplication IDYes
ENV_KEYThe key of relevant environment parameterYes
ENV_VALUEThe value of relevant environment parameterYes
--deployDeploys the current version to enable environment variables will be changed.No

Example 1

$ akinoncli projectapp add-env 1 32 DEFAULT_LANG=TR_TR --deploy

It is also can be used with JSON

Example 2

$ akinoncli projectapp add-env 1 32 MIDDLEWARE='["my.custom.MiddlewareClass", "", "whitenoise.middleware.WhiteNoiseMiddleware", "django.contrib.sessions.middleware.SessionMiddleware"]'

Example 3

$ akinoncli projectapp add-env 1 32 THUMBNAIL_OPTIONS='{"product-list": {"width": 273, "height": 210}, "product-detail__slider_zoom": {"quality": 90}}'