Skip to content

Instantly share code, notes, and snippets.

@palanglung
Created October 17, 2017 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palanglung/6b5a06bd3f02c1b22b307b04b02fce6d to your computer and use it in GitHub Desktop.
Save palanglung/6b5a06bd3f02c1b22b307b04b02fce6d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Loading Environment for Hook Data on Golang Prebuilt Elasticbeanstalk
# set some directory environment
EB_APP_USER=$(/opt/elasticbeanstalk/bin/get-config container -k app_user)
EB_APP_CURRENT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir)
EB_APP_STAGING_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_staging_dir)
# get config and eval environment variables
eval $(/opt/elasticbeanstalk/bin/get-config --output YAML environment | perl -ne "/^\w/ or next; s/: /=/; print qq|\$_|")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment