-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding production images for Solr & Blacklight
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |