Last active
October 28, 2017 15:25
-
-
Save dduvnjak/3b21e247c9fcd409a12d to your computer and use it in GitHub Desktop.
Elastic Beanstalk configuration file for installing phantomjs globally
This file contains 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
files: | |
"/opt/elasticbeanstalk/nodepath.rb": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env ruby | |
require 'json' | |
cc = "/opt/elasticbeanstalk/deploy/configuration/containerconfiguration" | |
j = JSON.parse(File.read(cc)) | |
node_version = j["optionsettings"]["aws:elasticbeanstalk:container:nodejs"]["NodeVersion"] | |
node_path = "/opt/elasticbeanstalk/node-install/node-v#{node_version}-linux-x64/bin/" | |
puts node_path | |
commands: | |
install_phantom: | |
command: bash -c "PATH=`/opt/elasticbeanstalk/nodepath.rb`:\$PATH npm -g install phantomjs" |
It wouldn't, preinstalled Node.js is required for it to work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would this work for a PHP version of Elastic Beanstalk?