Configure gateway deployment mode from environment variable
j
jeffrey.turner@cromarty.com.au
It would be extremely useful to allow the active deployment mode to be set via environment variables in Docker.
For example:
DEPLOYMENT_MODE=dev
This would significantly improve Git-based workflows. An Ignition instance could be pulled directly from a code repository, while the local development container automatically overrides the deployment mode to dev using environment variables.
Log In
A
Andrew Budaiev
But,can't you pass the deployment mode as a wrapper argument?
j
jeffrey.turner@cromarty.com.au
Andrew Budaiev Thank you, you are correct. For others who may be trying to do this, my testing found that the env vars must start with "IGNITION_".
In the docker configuration, configure the env var:
IGNITION_DEPLOYMENT_MODE=dev
Or the name of your mode
Then in ignition.conf:
wrapper.java.additional.9=-Dignition.config.mode=%IGNITION_DEPLOYMENT_MODE%
Replace '9' with your next avaliable number
P
Paul Griffith
jeffrey.turner@cromarty.com.au
There's no need for the indirection of an environment variable. You can directly inject system properties at the image command line: