mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-12 12:50:53 +00:00
have log file created in dockerfile
This commit is contained in:
parent
57859244ae
commit
c13d053bd8
2 changed files with 3 additions and 6 deletions
|
@ -14,8 +14,8 @@ RUN service memcached start
|
||||||
ADD Gemfile /var/www/
|
ADD Gemfile /var/www/
|
||||||
ADD Gemfile.lock /var/www/
|
ADD Gemfile.lock /var/www/
|
||||||
RUN chown -R web:web /var/www &&\
|
RUN chown -R web:web /var/www &&\
|
||||||
mkdir -p /var/bundle &&\
|
mkdir -p /var/bundle &&\
|
||||||
chown -R web:web /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
|
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
|
WORKDIR /var/www
|
||||||
USER web
|
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 config github.https true; cd /var/www && bundle install --path /var/bundle --jobs 4
|
||||||
RUN bundle exec rake assets:precompile
|
RUN bundle exec rake assets:precompile
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,5 @@ rm -rf /var/www/public/assets
|
||||||
mv /home/web/assets /var/www/public/
|
mv /home/web/assets /var/www/public/
|
||||||
chown -R web:web /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 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
|
su -c "cd /var/www && bundle exec puma -C config/puma.rb" -s /bin/bash -l web
|
||||||
|
|
Loading…
Reference in a new issue