mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 21:10:54 +00:00
4513bc9f84
Dockerfile clean up + comments entry.sh more env vars Fix env* rbs Comment out SSL for now in nginx Doc updates
21 lines
689 B
Bash
Executable file
21 lines
689 B
Bash
Executable file
#!/bin/bash
|
|
|
|
cd /var/www
|
|
|
|
source script/env.sh .env .env.$RAILS_ENV .env.$RAILS_ENV.local .env.local
|
|
|
|
# Make sure we have all assets
|
|
su -c "bundle config github.https true; cd $DEPLOY_PATH && bundle install --path /var/bundle --jobs 4" -s /bin/bash -l web
|
|
|
|
if [ -z $ASSETS_PRECOMPILE ] && [ $ASSETS_PRECOMPILE -eq 1 ]; then
|
|
if [[ -z "$ASSETS_PATH" ]] && [ -d "$ASSETS_PATH"]; then
|
|
rm -rf "${DEPLOY_PATH}/public/assets"
|
|
mv "$ASSETS_PATH" "${DEPLOY_PATH}/public/assets"
|
|
else
|
|
su -c "cd $DEPLOY_PATH && bundle assets:precompile" -s /bin/bash -l web
|
|
fi
|
|
chown -R web:web $DEPLOY_PATH
|
|
fi
|
|
|
|
su -c "cd $DEPLOY_PATH && bundle exec puma -C config/puma.rb" -s /bin/bash -l web
|
|
bash
|