Question:
For example, if I wish to mount a particular volume that is defined by an environment variable.
Answer:
I ended up using the following code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
--- files: "/opt/elasticbeanstalk/hooks/appdeploy/pre/02my_setup.sh": owner: root group: root mode: "000755" content: | #!/bin/bash set -e . /opt/elasticbeanstalk/hooks/common.sh EB_CONFIG_APP_CURRENT=$(/opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir) EB_SUPPORT_FILES_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k support_files_dir) # load env vars eval $($EB_SUPPORT_FILES_DIR/generate_env | sed 's/$/;/') |