Sha256: 9b2e9f2153b11ea4f7b599103ae671168f56c87349dd63239e87a64f3e6dfa24
Contents?: true
Size: 1.22 KB
Versions: 45
Compression:
Stored size: 1.22 KB
Contents
# Deploying React on Rails to Elastic Beanstalk In order to deploy a React on Rails app to elastic beanstalk, you must install yarn on each instance. If yarn is not installed, asset compilation will fail on the elastic beanstalk instance. You can install yarn by adding a `yarn.config` file to your `.ebextensions` folder which contains these commands. ``` commands: 01_node_get: cwd: /tmp command: 'sudo curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -' 02_node_install: cwd: /tmp command: 'sudo yum -y install nodejs' 03_yarn_get: 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: cwd: /tmp test: '[ ! -f /usr/bin/yarn ] && echo "yarn not installed"' command: 'sudo yum -y install yarn' 05_mkdir_webapp_dir: command: mkdir /home/webapp ignoreErrors: true 06_chown_webapp_dir: command: chown webapp:webapp /home/webapp ignoreErrors: true 07_chmod_webapp_dir: command: chmod 700 /home/webapp ignoreErrors: true ```
Version data entries
45 entries across 45 versions & 1 rubygems