Skip to content

Instantly share code, notes, and snippets.

@ohadlevy
Created November 7, 2018 16:22
Show Gist options
  • Save ohadlevy/b8358efc28bf9fb448c46b1cf9f1ec2c to your computer and use it in GitHub Desktop.
Save ohadlevy/b8358efc28bf9fb448c46b1cf9f1ec2c to your computer and use it in GitHub Desktop.
#! /bin/bash
cd ~/git/foreman
export FOREMAN_APIPIE_LANGS=en
export RAILS_ENV=production
export WEBPACK_BUILD_SERVER=fdev-backup
git pull &&
(
gem install bundler && bundle update &&
(
bundle clean --force &&
bundle exec rake db:migrate db:seed &
bundle exec rake assets:clean assets:precompile &
bundle exec rake apipie:cache:index &
bundle exec ./script/dynflowd restart &&
touch tmp/restart.txt
) &
ssh $WEBPACK_BUILD_SERVER '~/webpack-compile'
) &&
#(npm update --no-optional && npm prune && ssh $WEBPACK_BUILD_SERVER '~foreman/webpack-compile' ) ) &&
echo "DONE!"
tail -f log/production.log
#! /bin/bash
#. /opt/rh/rh-nodejs4/enable
#. /opt/rh/rh-ruby24/enable
npm i --no-optional
export RAILS_ENV=production
./node_modules/webpack/bin/webpack.js --config config/webpack.config.js
npm run analyze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment