Launching a composition and defining a service environment variables using a file
Sometimes when launching a composition there is a need to pass many environment variables to a specific service. In order to do that you can use docker-compose ‘env_file’ field on any service and use files from the current working directory from which the composition is being launched. This will work for both ‘composition’ and ‘launch-composition’ step types.
Using env_file will not work in case you are launching a composition directly from the Compositions view because it is being launched in an empty working directory.
Consider moving the composition launch as part of a usual pipeline which will give you ability to use files from your cloned repository.
Compositions are being launch inside a working directory, which is the cloned repository by default. This means that you can always reference an ‘env_file’ exactly like you would reference a docker-compose file.
Composition from file