Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. files:
  2. "/opt/elasticbeanstalk/hooks/appdeploy/pre/02export_host_env_vars.sh":
  3. mode: "000755"
  4. owner: root
  5. group: root
  6. content: |
  7. #!/usr/bin/env bash
  8. echo Defaults:root \!requiretty >> /etc/sudoers
  9. for envvar in `jq '.optionsettings | {"aws:elasticbeanstalk:application:environment"}[] | .[]' /opt/elasticbeanstalk/deploy/configuration/containerconfiguration`
  10. do
  11. host_vars="${envvar//\"/}";
  12. host_vars="${host_vars/=/ }";
  13. sed -i "/ENV HOST_VARS inject_here/a ENV $host_vars" /var/app/current/Dockerfile
  14. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement