Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 27 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://hub.docker.com/_/centos for details on the first stage of this build
FROM centos:7 AS systemd-enabled
FROM almalinux:8 AS systemd-enabled
ENV container docker
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
Expand All @@ -15,37 +15,40 @@ CMD ["/usr/sbin/init"]

FROM systemd-enabled

COPY docker/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo

# Install dependencies
# Install compilers for gems & more dependencies - this section is > 1 GB so might see if we can shrink it down some
# Should we remove git, since the mutagen files can't see the git directory?
# See https://mutagen.io/documentation/synchronization/version-control-systems
# devtoolset-8 installed due to newer mini_racer requirement of newer g++
# Also install ChromeDriver
# TODO: are we using httpd?
RUN yum -y update \
&& yum -y install epel-release \
&& yum -y install centos-release-scl-rh centos-release-scl \
&& yum -y install libyaml libyaml-devel \
&& yum -y --enablerepo=centos-sclo-rh install rh-ruby30 rh-ruby30-ruby-devel \
&& yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \
&& yum -y install gcc gcc-c++ zlib-devel devtoolset-8 postgresql14 libpq5-devel libxslt-devel \
&& yum -y install git libreoffice clamav-devel clamav clamav-update clamd redhat-lsb libXScrnSaver wget unzip \
&& yum -y install ghostscript GraphicsMagick \
&& yum -y install chromium \
&& yum -y install rh-nodejs14 \
&& yum install -y python3 \
&& yum clean all && rm -rf /var/cache/yum \
RUN dnf -y update \
&& dnf -y install epel-release \
&& dnf config-manager --set-enabled powertools \
&& dnf -y install gcc gcc-c++ make git \
&& dnf -y install libyaml libyaml-devel libxml2-devel libxslt-devel zlib-devel \
&& dnf -y install libsass libsass-devel \
&& dnf -y module enable ruby:3.0 nodejs:14 \
&& dnf -y install ruby ruby-devel \
&& dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm \
&& dnf -qy module disable postgresql \
&& dnf install -y python3 python3-devel \
&& dnf -y install nodejs-devel npm \
&& dnf -y install postgresql14 postgresql14-devel postgresql14-libs libxslt-devel \
# Create symlinks for standard paths so bundler can find postgres config
&& ln -s /usr/pgsql-14 /usr/pgsql \
&& ln -s /usr/pgsql-14/bin/pg_config /usr/local/bin/pg_config \
&& dnf -y install git libreoffice-core clamav-devel clamav clamav-update clamd redhat-lsb-core libXScrnSaver wget unzip \
&& dnf -y install ghostscript GraphicsMagick \
&& dnf -y install chromium \
&& dnf clean all && rm -rf /var/cache/yum \
&& wget -q -P /tmp "https://github.com/harvard-lts/fits/releases/download/1.5.5/fits-1.5.5.zip" \
&& mkdir /fits \
&& unzip /tmp/fits-1.5.5.zip -d /fits/fits-1.5.5 \
&& rm -f /tmp/fits-1.5.5.zip \
&& echo "source scl_source enable devtoolset-8" >> /etc/bashrc \
&& echo "source scl_source enable rh-ruby30" >> /etc/bashrc \
&& scl enable rh-nodejs14 -- npm install yarn -g \
&& scl enable rh-nodejs14 -- yarn \
&& yum -y update ca-certificates
&& npm install yarn -g \
&& yarn \
&& dnf -y update ca-certificates

ENV PATH "/fits:$PATH"
COPY docker/fits.xml /fits/fits-1.5.5/xml/fits.xml
Expand All @@ -56,9 +59,9 @@ COPY Gemfile* /hyrax/
WORKDIR /hyrax

ENV BUNDLER_ALLOW_ROOT=1
RUN scl enable devtoolset-8 rh-ruby30 -- gem install rubygems-update \
&& scl enable devtoolset-8 rh-ruby30 -- update_rubygems \
&& scl enable devtoolset-8 rh-ruby30 -- gem update --system
RUN gem install rubygems-update \
&& update_rubygems \
&& gem update --system

# Create FTP directories
RUN mkdir -p /opt/data/ftp/proquest && mkdir -p /opt/data/ftp/sage
Expand Down
22 changes: 13 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,32 @@ gem 'bulkrax', '6.0.1'
gem 'clamav-client', require: 'clamav/client'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 5.0.0'
gem 'concurrent-ruby', '1.3.4'
gem 'devise', '~> 4.8.0'
gem 'devise-guests', '~> 0.8.1'
gem 'edtf-humanize', '~> 2.1'
# See https://github.com/rails/execjs#readme for more supported runtimes
gem 'execjs', '2.8.1'
gem 'httparty', '~>0.21.0'
gem 'hydra-editor', '~> 6.0'
gem 'hydra-role-management', '~> 1.0'
gem 'hydra-editor', '~> 6.2.0'
gem 'hydra-pcdm', '~> 1.3.0'
gem 'hydra-role-management', '~> 1.1.0'
gem 'hydra-works', '~> 2.1.0'
gem 'hyrax', git: 'https://github.com/UNC-Libraries/hyrax.git', branch: 'unc-hyrax-4-development'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.11.2'
# Use jquery as the JavaScript library
gem 'jquery-rails', '~> 4.5.0'
gem 'json-canonicalization', '0.3.1'
gem 'json-ld', '~> 3.2'
gem 'libv8', '~> 7.3'
# linkeddata gem is released with rdf gems and should be the same version as rdf
gem 'sparql', '3.2.5'
gem 'ldp', '~> 1.1'
gem 'linkeddata'
gem 'logger', '1.5.3'
gem 'loofah', '~>2.19.1'
gem 'mini_magick', '~>4.12.0'
gem 'mini_racer', '~> 0.2.15', platforms: :ruby
gem 'nokogiri', '~>1.14.2'
gem 'nokogiri', '~>1.14.2', platforms: :ruby
gem 'omniauth', '~> 2.0'
gem 'omniauth-rails_csrf_protection'
gem 'omniauth-shibboleth', '~> 1.3'
Expand All @@ -54,7 +55,7 @@ gem 'passenger', '6.0.22', require: 'phusion_passenger/rack_handler'
gem 'pg', '~> 1.3.5'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0'
gem 'rdf', git: 'https://github.com/ruby-rdf/rdf.git', branch: '3.2.11-patch'
gem 'rdf', '~> 3.3.4'
# Use Redis adapter to run Action Cable in production
gem 'redis', '~> 4.5.0'
gem 'redlock' # version determined by hyrax
Expand All @@ -65,6 +66,7 @@ gem 'rsolr', '~> 2.5.0'
gem 'sass-rails', '~> 6.0.0'
gem 'sidekiq', '~> 6.5'
gem 'sidekiq-status', '~> 3.0.0'
gem 'sprockets', '3.7.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5.2.1'
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
Expand All @@ -77,12 +79,13 @@ group :development, :test do
gem 'database_cleaner'
gem 'fcrepo_wrapper', '~> 0.9.0'
gem 'rspec-rails', '~> 5.1.2'
# Rubocop for style and error checking (linter)
gem 'rubocop'
# Rubocop for style and error checking (linter), locking version for now since newer versions have more rules
gem 'rubocop', '~> 1.58.0'
gem 'rubocop-rails'
gem 'rubocop-rspec'
gem 'solr_wrapper', '~> 4.0.2'
gem 'rubocop-github'
# Locking for now otherwise newer versions reject some of the rules
gem 'rubocop-github', '~> 0.20.0'
gem 'rubocop-performance', require: false
end

Expand All @@ -95,6 +98,7 @@ end

group :test do
gem 'capybara', '~> 3.36'
gem 'equivalent-xml', '~> 0.6'
gem 'factory_bot_rails', '~> 6.2.0'
gem 'ffaker'
gem 'rspec-mocks'
Expand Down
Loading