Skip to content

Commit

Permalink
Adding production images for Solr & Blacklight
Browse files Browse the repository at this point in the history
  • Loading branch information
jefawks3 committed Nov 10, 2022
1 parent eed35b6 commit 0fdb5b7
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .docker/rails.prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
FROM ruby:3.1.2

ARG RAILS_ENV="production"
ARG RAKE_ENV=${RAILS_ENV}
ARG NODE_ENV="production"
ARG RAILS_PORT=3000
ARG APP_ROOT="/app"

ENV RAILS_ENV="${RAILS_ENV}" \
RAKE_ENV="${RAKE_ENV}" \
NODE_ENV="${NODE_ENV}" \
APP_ROOT="${APP_ROOT}"

RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update -qq && \
apt-get install -y --no-install-recommends \
build-essential \
default-jre \
git \
bash \
libxml2-dev \
libxslt-dev \
shared-mime-info \
libmariadb-dev \
nodejs \
yarn && \
apt-get clean && \
rm --recursive --force /var/lib/apt/lists/* \

# Make App Working Directory
RUN mkdir $APP_ROOT
WORKDIR $APP_ROOT

# Bundle Gems
COPY ../Gemfile $APP_ROOT
COPY ../Gemfile.lock $APP_ROOT
RUN gem install bundler:2.3.7
RUN bundle config --global frozen 1
RUN bundle install --deployment --without development test

# Copy Code
COPY .. $APP_ROOT

# Compile Assets
RUN bundle exec rake assets:precompile

# Expose port
EXPOSE "${RAILS_PORT}"
10 changes: 10 additions & 0 deletions .docker/solr.prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ARG SOLR_VERSION=9.0.0

FROM solr:${SOLR_VERSION}

ARG SOLR_PORT=8983

# Copy Solr Configuration from Blacklight
COPY ../solr/conf /opt/solr/conf

EXPOSE ${SOLR_PORT}

0 comments on commit 0fdb5b7

Please sign in to comment.