Skip to content

Commit

Permalink
Merge pull request #3912 from avalonmediasystem/staging
Browse files Browse the repository at this point in the history
Release 7.0 🎉
  • Loading branch information
Jon Cameron authored Jan 8, 2020
2 parents 1ac14ba + 5a1d70b commit 95b855b
Show file tree
Hide file tree
Showing 639 changed files with 13,974 additions and 7,790 deletions.
23 changes: 3 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
build:
docker:
# Primary container image where all steps run.
- image: avalonmediasystem/avalon:6.x-dev
- image: avalonmediasystem/avalon:7.0-slim-dev-20200106
environment:
- DATABASE_URL=postgresql://postgres@localhost:5432/postgres
- FEDORA_URL=http://localhost:8080/fcrepo/rest
Expand Down Expand Up @@ -33,9 +33,6 @@ jobs:
parallelism:
type: integer
default: 4
bundler_version:
type: string
default: "2.0.1"

working_directory: /home/app/avalon

Expand All @@ -50,26 +47,12 @@ jobs:

- run: cp config/controlled_vocabulary.yml.example config/controlled_vocabulary.yml

- restore_cache:
keys:
- gem-cache-v1-{{ checksum "Gemfile.lock" }}-<< parameters.ruby_ver >>

- run:
name: Update bundler
command: |
echo 'export BUNDLER_VERSION=<< parameters.bundler_version >>' >> $BASH_ENV
gem install bundler -v << parameters.bundler_version >>
- run:
command: |
bundle install --with aws development test postgres --without production --path=vendor/bundle --jobs=4 --retry=3
unset BUNDLE_APP_CONFIG
bundle install --with aws development test postgres --without production --jobs=4 --retry=3
bundle exec rake db:migrate
- save_cache:
key: gem-cache-v1-{{ checksum "Gemfile.lock" }}-<< parameters.ruby_ver >>
paths:
- vendor/bundle

- restore_cache:
keys:
- yarn-cache-v1-{{ arch }}-{{ checksum "yarn.lock" }}
Expand Down
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.git
.DS_Store
.gitignore
.env
tmp
Dockerfile
docker-compose.yml
2 changes: 1 addition & 1 deletion .solr_wrapper
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Place any default configuration for solr_wrapper here
version: 7.1.0
version: 7.7.2
# port: 8983
instance_dir: tmp/solr-development
collection:
Expand Down
2 changes: 1 addition & 1 deletion Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/passenger'
require 'capistrano-resque'
require 'capistrano-sidekiq'
require 'capistrano/yarn'
require "whenever/capistrano"

Expand Down
75 changes: 75 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Base stage for building gems
FROM ruby:2.5.5-stretch as base
ENV BUNDLER_VERSION 2.0.2
RUN echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list \
&& apt-get update && apt-get upgrade -y build-essential \
&& apt-get install -y --no-install-recommends \
cmake \
pkg-config \
zip \
git \
&& gem install bundler \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

RUN mkdir -p /home/app/avalon
WORKDIR /home/app/avalon

COPY Gemfile ./Gemfile
COPY Gemfile.lock ./Gemfile.lock
RUN bundle config build.nokogiri --use-system-libraries \
&& bundle install --with aws development test postgres --without production


# Download stage takes advantage of parallel build
FROM ruby:2.5.5-stretch as download
RUN curl https://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip -o /usr/local/bin/chromedriver \
&& chmod +x /usr/local/bin/chromedriver \
&& curl -L https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz | tar xvz -C /usr/bin/ \
&& mkdir -p /tmp/ffmpeg && cd /tmp/ffmpeg \
&& curl https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar xJ \
&& cp `find . -type f -executable` /usr/bin/


# Dev stage for building dev image
FROM ruby:2.5.5-slim-stretch as dev
ENV BUNDLER_VERSION 2.0.2
RUN apt-get update && apt-get install -y --no-install-recommends curl gnupg2 \
&& curl -sL http://deb.nodesource.com/setup_8.x | bash - \
&& curl -O https://mediaarea.net/repo/deb/repo-mediaarea_1.0-6_all.deb && dpkg -i repo-mediaarea_1.0-6_all.deb \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

RUN apt-get update && apt-get install -y --no-install-recommends \
yarn \
nodejs \
lsof \
x264 \
sendmail \
git \
libxml2-dev \
libxslt-dev \
libpq-dev \
mediainfo \
openssh-client \
zip \
imagemagick \
dumb-init \
&& gem install bundler \
&& curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /chrome.deb \
&& dpkg -i /chrome.deb || apt-get install -yf \
&& ln -s /usr/bin/lsof /usr/sbin/

ARG AVALON_BRANCH=develop
ARG RAILS_ENV=development
ARG BASE_URL
ARG DATABASE_URL
ARG SECRET_KEY_BASE

COPY --from=base /usr/local/bundle /usr/local/bundle
COPY --from=download /usr/local/bin/chromedriver /usr/local/bin/chromedriver
COPY --from=download /usr/bin/ff* /usr/bin/
COPY --from=download /usr/bin/dockerize /usr/bin/

WORKDIR /home/app/avalon
ADD docker_init.sh /
20 changes: 10 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
source 'https://rubygems.org'

# Core rails
gem 'rails', '=5.2.3'

gem 'bootsnap', require: false
gem 'listen'
gem 'rails', '=5.2.3'
gem 'sprockets', '~>3.7.2'
gem 'sqlite3'

Expand Down Expand Up @@ -41,32 +40,34 @@ gem 'activerecord-session_store'
gem 'acts_as_list'
gem 'api-pagination'
gem 'avalon-about', git: 'https://github.com/avalonmediasystem/avalon-about.git', tag: 'avalon-r6.4'
gem 'bootstrap-toggle-rails', git: 'https://github.com/rkallensee/bootstrap-toggle-rails.git', tag: 'v2.2.1.0'
gem 'bootstrap-toggle-rails'
gem 'bootstrap_form'
gem 'iiif_manifest', '~> 0.6'
gem 'rack-cors', require: 'rack/cors'
gem 'recaptcha', require: 'recaptcha/rails'
gem 'samvera-persona', '~> 0.1.7'
gem 'speedy-af', '~> 0.1.3'

# Avalon Components
gem 'avalon-workflow', git: "https://github.com/avalonmediasystem/avalon-workflow.git", tag: 'avalon-r6.5'

# Authentication & Authorization
gem 'devise', '~> 4.4'
gem 'devise_invitable', '~> 1.6'
gem 'ims-lti', '~> 1.1.13'
gem 'net-ldap'
gem 'omniauth-identity'
gem 'omniauth-lti', git: "https://github.com/avalonmediasystem/omniauth-lti.git", tag: 'avalon-r4'

# Media Access & Transcoding
gem 'active_encode', '~> 0.1.1'
gem 'active_encode', '~> 0.7.0'
gem 'audio_waveform-ruby', require: 'audio_waveform'
gem 'browse-everything', '~> 0.13.0'
gem 'media_element_add_to_playlist', git: 'https://github.com/avalonmediasystem/media-element-add-to-playlist.git', tag: 'avalon-r6.5'
gem 'mediainfo', git: "https://github.com/avalonmediasystem/mediainfo.git", tag: 'avalon-r6.5'
gem 'rest-client'
gem 'mini_magick', '~> 4.9'
gem 'rest-client', '~> 2.0'
gem 'roo'
gem 'rubyhorn', git: "https://github.com/avalonmediasystem/rubyhorn.git", tag: 'avalon-r6'
gem 'wavefile', '~> 1.0.1'

# Data Translation & Normalization
Expand All @@ -87,8 +88,7 @@ gem 'mediaelement-track-scrubber', git: 'https://github.com/avalonmediasystem/me
# Jobs
gem 'activejob-traffic_control'
gem 'redis-rails'
gem 'resque', '~> 2.0'
gem 'resque-scheduler', '~> 4.4'
gem 'sidekiq', '~> 5.2.7'

# Coding Patterns
gem 'config'
Expand All @@ -100,10 +100,10 @@ gem 'with_locking'

group :development do
gem 'capistrano', '~>3.6'
gem 'capistrano-passenger', require: false
gem 'capistrano-rails', require: false
gem 'capistrano-resque', require: false
gem 'capistrano-rvm', require: false
gem 'capistrano-passenger', require: false
gem 'capistrano-sidekiq', require: false
gem 'capistrano-yarn', require: false

# Use Bixby instead of rubocop directly
Expand Down
Loading

0 comments on commit 95b855b

Please sign in to comment.