Last active
October 19, 2017 08:27
-
-
Save detelin/c8381967d195e2d89702ef335a2c633a to your computer and use it in GitHub Desktop.
AWS: Copy Elastic Beanstalk environment variables to NGINX config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/opt/elasticbeanstalk/bin/get-config environment | python -c 'import json,sys;obj=json.load(sys.stdin);open("/etc/nginx/nginx_environment_variables", "wb").write("\n".join(["set $%s \"%s\";" % (key, obj[key]) for key in obj]));' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment