Skip to content

Instantly share code, notes, and snippets.

@orumin
Last active July 24, 2019 12:04
Show Gist options
  • Select an option

  • Save orumin/42eceb8fe7256be429582ead61888796 to your computer and use it in GitHub Desktop.

Select an option

Save orumin/42eceb8fe7256be429582ead61888796 to your computer and use it in GitHub Desktop.
file
FROM orumin/enju_leaf:1.3.1
LABEL maintainer="https://github.com/orumin/enju_leaf_docker"
ENV DB_USER enju_leaf
ENV DB_PASS admin
ENV DB_NAME enju_leaf_production
ENV DB_HOST db
ENV RAILS_SERVE_STATIC_FILES true
ENV REDIS_URL redis://redis/enju_leaf
ENV SOLR_URL http://solr:8983/solr/default
ENV RAILS_ENV production
EXPOSE 3000
RUN echo "" >> Gemfile \
&& echo "gem 'enju_nii', '~> 0.3.0'" >> Gemfile \
&& echo "gem 'enju_loc', '~> 0.3.0'" >> Gemfile \
&& echo "gem 'enju_oai', '~> 0.3.0'" >> Gemfile \
&& echo "gem 'enju_purchase_request', '~> 0.3.0.beta.beta.1'" >> Gemfile \
&& echo "gem 'enju_bookmark', '~> 0.3.0'" >> Gemfile
RUN apk add --no-cache --virtual .build-deps \
build-base \
icu-dev \
libressl \
libxslt-dev \
zlib-dev
&& bundle update \
&& rm -rf /enju_leaf/vendor/bundle/ruby/2.6.0/cache
&& apk del --purge .build-deps
COPY app.patch .
RUN patch -p0 < app.patch
RUN echo 'Manifestation.include(EnjuOai::OaiModel)' >> app/models/user.rb
RUN sed -i -e 's/\(\*\.png\)/\1 *.gif/' config/initializers/assets.rb
RUN bundle exec rake enju_purchase_request_engine:install:migrations
RUN bundle exec rake enju_bookmark_engine:install:migrations
ENTRYPOINT ["/sbin/tini", "--"]
--- Dockerfile.orig 2019-07-24 20:59:51.000000000 +0900
+++ Dockerfile 2019-07-24 20:59:55.000000000 +0900
@@ -20,8 +20,15 @@
&& echo "gem 'enju_purchase_request', '~> 0.3.0.beta.beta.1'" >> Gemfile \
&& echo "gem 'enju_bookmark', '~> 0.3.0'" >> Gemfile
-RUN bundle update \
+RUN apk add --no-cache --virtual .build-deps \
+ build-base \
+ icu-dev \
+ libressl \
+ libxslt-dev \
+ zlib-dev
+ && bundle update \
&& rm -rf /enju_leaf/vendor/bundle/ruby/2.6.0/cache
+ && apk del --purge .build-deps
COPY app.patch .
RUN patch -p0 < app.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment