Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- files:
- "/opt/elasticbeanstalk/hooks/appdeploy/pre/02export_host_env_vars.sh":
- mode: "000755"
- owner: root
- group: root
- content: |
- #!/usr/bin/env bash
- echo Defaults:root \!requiretty >> /etc/sudoers
- for envvar in `jq '.optionsettings | {"aws:elasticbeanstalk:application:environment"}[] | .[]' /opt/elasticbeanstalk/deploy/configuration/containerconfiguration`
- do
- host_vars="${envvar//\"/}";
- host_vars="${host_vars/=/ }";
- sed -i "/ENV HOST_VARS inject_here/a ENV $host_vars" /var/app/current/Dockerfile
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement