This example shows how to execute a bash script and pass environment variables to other services within the same environment with Qovery Lifecycle Job.
To test locally, you can run the following commands:
docker build -t shell-script .
docker run shell-script create-environment.sh
If you run locally this script it's normal you get an error
create-environment.sh: 10: cannot create /qovery-output/qovery-output.json: Directory nonexistent
since /qovery-output/
is a directory
created by Qovery and not locally.
To use it on Qovery, set up the CMD Arguments to:
For environment start event:
["create-environment.sh"]