Update dockerfile

Remove .env reference, clean up
This commit is contained in:
Ari Timonen 2018-04-15 12:59:57 +00:00
parent fe66edf712
commit 3989846235
2 changed files with 5 additions and 15 deletions

View file

@ -7,6 +7,7 @@ RUN adduser web --home /home/web --shell /bin/bash --disabled-password --gecos "
RUN apt-get update && apt-get -y upgrade RUN apt-get update && apt-get -y upgrade
RUN apt-get -y install mysql-client libmysqlclient-dev memcached nodejs RUN apt-get -y install mysql-client libmysqlclient-dev memcached nodejs
RUN service memcached start
# Separate Gemfile ADD so that `bundle install` can be cached more effectively # Separate Gemfile ADD so that `bundle install` can be cached more effectively
@ -16,28 +17,17 @@ 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 bundle config github.https true 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 "cd /var/www && bundle install --path /var/bundle" -s /bin/bash -l web
# Add application source # Add application source
ADD . /var/www ADD . /var/www
RUN chown -R web:web /var/www RUN chown -R web:web /var/www
USER web
# Precompile assets # Precompile assets
#WORKDIR /var/www
WORKDIR /var/www
COPY .env /var/www/
RUN bundle install --path /var/bundle --jobs 4
#RUN bundle exec rake assets:precompile #RUN bundle exec rake assets:precompile
USER root # for debug
# FIXME: move this to docker image
RUN apt-get install -y memcached
RUN service memcached start
# USER root # USER root
USER web USER web

0
test.sh Normal file → Executable file
View file