mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 04:21:36 +00:00
Update dockerfile
Remove .env reference, clean up
This commit is contained in:
parent
fe66edf712
commit
3989846235
2 changed files with 5 additions and 15 deletions
20
Dockerfile
20
Dockerfile
|
@ -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 -y install mysql-client libmysqlclient-dev memcached nodejs
|
||||
RUN service memcached start
|
||||
|
||||
# Separate Gemfile ADD so that `bundle install` can be cached more effectively
|
||||
|
||||
|
@ -16,29 +17,18 @@ RUN chown -R web:web /var/www &&\
|
|||
mkdir -p /var/bundle &&\
|
||||
chown -R web:web /var/bundle
|
||||
|
||||
RUN bundle config github.https true
|
||||
RUN su -c "cd /var/www && bundle install --path /var/bundle" -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
|
||||
|
||||
# Add application source
|
||||
ADD . /var/www
|
||||
RUN chown -R web:web /var/www
|
||||
|
||||
USER web
|
||||
|
||||
# Precompile assets
|
||||
|
||||
WORKDIR /var/www
|
||||
COPY .env /var/www/
|
||||
RUN bundle install --path /var/bundle --jobs 4
|
||||
#WORKDIR /var/www
|
||||
#RUN bundle exec rake assets:precompile
|
||||
|
||||
USER root
|
||||
|
||||
# FIXME: move this to docker image
|
||||
RUN apt-get install -y memcached
|
||||
RUN service memcached start
|
||||
|
||||
#USER root
|
||||
# for debug
|
||||
# USER root
|
||||
|
||||
USER web
|
||||
CMD ["/var/www/entry.sh"]
|
||||
|
|
0
test.sh
Normal file → Executable file
0
test.sh
Normal file → Executable file
Loading…
Reference in a new issue