2018-04-23 15:29:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cd /var/www
|
2020-03-15 07:53:23 +00:00
|
|
|
|
2018-04-23 15:29:07 +00:00
|
|
|
source /var/www/.env
|
2018-04-25 16:41:22 +00:00
|
|
|
|
2020-03-15 07:53:23 +00:00
|
|
|
if [ $RAILS_ENV = "production" ]; then
|
|
|
|
rm -rf /var/www/public/assets
|
|
|
|
mv /home/web/assets /var/www/public/
|
|
|
|
chown -R web:web /var/www
|
|
|
|
fi
|
|
|
|
|
|
|
|
su -c "bundle config github.https true; cd /var/www && bundle install --path /var/bundle --jobs 4" -s /bin/bash -l web
|
2018-04-25 16:41:22 +00:00
|
|
|
su -c "cd /var/www && bundle exec puma -C config/puma.rb" -s /bin/bash -l web
|
2020-03-15 07:53:23 +00:00
|
|
|
bash
|