From 2c34da556aeeeb8b4d1f01e587fd18e59376bf06 Mon Sep 17 00:00:00 2001 From: Absurdon Date: Mon, 25 Nov 2019 14:11:38 +0100 Subject: [PATCH] Make sure the logfile exists --- script/entry.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/entry.sh b/script/entry.sh index e5afde9..b5656f5 100755 --- a/script/entry.sh +++ b/script/entry.sh @@ -7,5 +7,9 @@ rm -rf /var/www/public/assets mv /home/web/assets /var/www/public/ chown -R web:web /var/www/public +LOG_FILE = "/var/www/log/$RAILS_ENV.log" +touch $LOG_FILE +chown web:web $LOG_FILE + su -c "cd /var/www && bundle exec rake assets:precompile" -s /bin/bash -l web su -c "cd /var/www && bundle exec puma -C config/puma.rb" -s /bin/bash -l web