Skip to content

Instantly share code, notes, and snippets.

@hanhdt
Last active August 15, 2023 17:00
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save hanhdt/b55c07cf869f04195ada563fb1f01015 to your computer and use it in GitHub Desktop.
Save hanhdt/b55c07cf869f04195ada563fb1f01015 to your computer and use it in GitHub Desktop.
Setup additional linux packages on AWS Elastic Beanstalk that need to build Rails 5
# Setup linux packages
option_settings:
- option_name: BUNDLE_DISABLE_SHARED_GEMS
value: "1"
- option_name: BUNDLE_PATH
value: "vendor/bundle"
packages:
yum:
curl: []
git: []
gcc: []
epel-release: []
ruby-devel: []
make: []
ruby-irb: []
libyaml-devel: []
libxml2: []
libxml2-devel: []
libxslt: []
libxslt-devel: []
openssl-devel: []
libffi-devel: []
mysql: []
mysql-devel: []
zlib: []
zlib-devel: []
patch: []
readline: []
readline-devel: []
libyaml-devel: []
bzip2: []
autoconf: []
automake: []
gcc-c++: []
libtool: []
bison: []
commands:
01_node_get:
# run this command from /tmp directory
cwd: /tmp
# flag -y for no-interaction installation
command: 'curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -'
02_node_install:
# run this command from /tmp directory
cwd: /tmp
command: 'sudo yum -y install nodejs'
03_yarn_get:
# run this command from /tmp directory
cwd: /tmp
# don't run the command if yarn is already installed (file /usr/bin/yarn exists)
test: '[ ! -f /usr/bin/yarn ] && echo "yarn not installed"'
command: 'sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo'
04_yarn_install:
# run this command from /tmp directory
cwd: /tmp
test: '[ ! -f /usr/bin/yarn ] && echo "yarn not installed"'
command: 'sudo yum -y install yarn'
05_home_dir:
test: '[ ! -p /home/webapp ] && echo "webapp not exited"'
command: 'sudo mkdir -p /home/webapp'
06_grant_home_dir:
test: '[ ! -p /home/webapp ] && echo "webapp not exited"'
command: 'sudo chmod 777 /home/webapp'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment