ensl.org/bin/script/entry.sh
Ari Timonen 75b33e760a Move back to docker-compose + fix env vars
Fix env vars. Rely on inheritance.
Add a script to load env vars as above.
Fix staging env
Add nginx conf and SSL directory
Reorganize .gitignore
Use multi-staged docker-compose + dockerfile
Substitute env vars for static values
2020-04-05 05:58:41 +03:00

15 lines
446 B
Bash
Executable file

#!/bin/bash
cd /var/www
source script/env.sh .env .env.$RAILS_ENV .env.$RAILS_ENV.local .env.local
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
su -c "cd /var/www && bundle exec puma -C config/puma.rb" -s /bin/bash -l web
bash