mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-28 13:31:06 +00:00
30b9198b6d
Tune env vars Fix logs in gitignore Rename DEPLOY_PATH env var
28 lines
650 B
Bash
Executable file
28 lines
650 B
Bash
Executable file
#!/bin/bash
|
|
|
|
cd $APP_PATH
|
|
|
|
source script/env.sh .env .env.$RAILS_ENV .env.$RAILS_ENV.local .env.local
|
|
|
|
# Make sure we have all assets
|
|
bundle config github.https true
|
|
bundle config set path '/var/bundle'
|
|
bundle install --jobs 8
|
|
|
|
if [ "$ASSETS_PRECOMPILE" -eq 1 ]; then
|
|
echo "Fetching assets..."
|
|
if false; then
|
|
#if [[ -z "$ASSETS_PATH" ]] && [ -d "$ASSETS_PATH"]; then
|
|
rm -rf "${APP_PATH}/public/assets"
|
|
mv "$ASSETS_PATH" "${APP_PATH}/public/assets"
|
|
else
|
|
cd $APP_PATH
|
|
bundle exec rake assets:clean
|
|
bundle exec rake assets:precompile
|
|
fi
|
|
chown -R web:web $APP_PATH
|
|
fi
|
|
|
|
cd $APP_PATH
|
|
bundle exec puma -C config/puma.rb
|
|
bash
|