From c13d053bd879ca369f959ebed2f497b824eb8f1c Mon Sep 17 00:00:00 2001 From: Absurdon Date: Wed, 27 Nov 2019 17:57:52 +0100 Subject: [PATCH] have log file created in dockerfile --- Dockerfile | 5 +++-- script/entry.sh | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 44c92bf..fbcf53f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ RUN service memcached start ADD Gemfile /var/www/ ADD Gemfile.lock /var/www/ RUN chown -R web:web /var/www &&\ - mkdir -p /var/bundle &&\ - chown -R web:web /var/bundle + mkdir -p /var/bundle &&\ + chown -R web:web /var/bundle RUN su -c "bundle config github.https true; cd /var/www && bundle install --path /var/bundle --jobs 4" -s /bin/bash -l web @@ -26,6 +26,7 @@ RUN chown -R web:web /var/www WORKDIR /var/www USER web +RUN touch log/${RAILS_ENV}.log RUN bundle config github.https true; cd /var/www && bundle install --path /var/bundle --jobs 4 RUN bundle exec rake assets:precompile diff --git a/script/entry.sh b/script/entry.sh index cf40588..e5afde9 100755 --- a/script/entry.sh +++ b/script/entry.sh @@ -7,9 +7,5 @@ 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