-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4cc39d0
commit 35b2523
Showing
29 changed files
with
328 additions
and
17 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,37 @@ | ||
FROM ruby:2.6 | ||
ARG UNAME=app | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
ARG URL_ROOT=/ | ||
|
||
RUN curl https://deb.nodesource.com/setup_18.x | bash | ||
RUN curl https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | ||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | ||
|
||
RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends nodejs yarn | ||
RUN gem install bundler | ||
|
||
RUN groupadd -g $GID -o $UNAME | ||
RUN useradd -m -d /usr/src/app -u $UID -g $GID -o -s /bin/bash $UNAME | ||
RUN mkdir -p /gems && chown $UID:$GID /gems | ||
|
||
COPY --chown=$UID:$GID Gemfile* /usr/src/app/ | ||
|
||
ENV RAILS_SERVE_STATIC_FILES true | ||
ENV RAILS_LOG_TO_STDOUT true | ||
ENV RAILS_ENV production | ||
ENV BUNDLE_PATH /gems | ||
|
||
# This can be anything but must be set. | ||
ENV SECRET_KEY_BASE 121222bccca | ||
|
||
WORKDIR /usr/src/app | ||
RUN bundle install --without development test | ||
|
||
COPY --chown=$UID:$GID . /usr/src/app | ||
RUN RAILS_ENV=production bin/rails assets:precompile | ||
RUN chown -R $UID:$GID /usr/src/app | ||
USER $UNAME | ||
|
||
|
||
CMD ["bin/rails", "s", "-b", "0.0.0.0"] |
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
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
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
require "sidekiq" | ||
|
||
module Dromedary | ||
class IndexDataJob | ||
include Sidekiq::Job | ||
|
||
queue_as :default | ||
|
||
def perform(filename) | ||
puts "indexing data" | ||
exit_code = `bin/dromedary extract_convert_index #{filename}` | ||
puts "finished preparing with exit code #{exit_code}" | ||
end | ||
end | ||
end |
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,2 @@ | ||
require_relative "./poke_sidekiq" | ||
require_relative "./index_data_job" |
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,11 @@ | ||
require "sidekiq" | ||
|
||
module Dromedary | ||
class PokeSidekiqJob | ||
include Sidekiq::Job | ||
|
||
def perform | ||
puts "hiiiiii" | ||
end | ||
end | ||
end |
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
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
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
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
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
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
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
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
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
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
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,5 @@ | ||
data_dir: /home/esty/github/mlibrary/med/data | ||
build_dir: /home/esty/github/mlibrary/med/data/build | ||
|
||
blacklight: | ||
url: http://localhost:9639/solr/med |
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,29 @@ | ||
blacklight: | ||
adapter: solr | ||
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:9639/solr/med" %> | ||
|
||
solr: | ||
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:9639/solr/med" %> | ||
|
||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] || "somesecretkey" %> | ||
|
||
|
||
|
||
db: | ||
url: unused | ||
|
||
cable: | ||
adapter: async | ||
url: unused | ||
channel_prefix: dromedary | ||
|
||
|
||
relative_url_root: <%= ENV["RAILS_RELATIVE_URL_ROOT"] || "/" %> | ||
|
||
data_dir: <%= ENV["DATA_DIR"] || "./data" %> | ||
build_dir: <%= ENV["BUILD_DIR"] || "./data/build" %> | ||
|
||
log_dir: <%= ENV["LOG_DIR"] || "./log" %> | ||
|
||
#data_dir: /home/esty/github/mlibrary/med/data | ||
#build_dir: /home/esty/github/mlibrary/med/data/build |
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,8 @@ | ||
development: | ||
:concurrency: 1 | ||
|
||
production: | ||
:concurrency: 1 | ||
|
||
:queues: | ||
- default |
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,32 @@ | ||
FROM ruby:2.6 | ||
|
||
ENV DATA_FILE=/opt/app-data/All_MED_and_BIB_files.zip | ||
ENV data_dir=/usr/src/app/data | ||
ENV build_dir=/usr/src/app/data/build | ||
ENV SOLR_URL=http://localhost:9639/solr | ||
ARG UNAME=app | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
|
||
RUN apt-get update -yqq && \ | ||
apt-get install -yqq --no-install-recommends \ | ||
apt-transport-https nodejs | ||
|
||
RUN groupadd -g $GID -o $UNAME | ||
RUN useradd -m -d /usr/src/app -u $UID -g $GID -o -s /bin/bash $UNAME | ||
RUN mkdir -p /gems && chown $UID:$GID /gems | ||
|
||
USER $UNAME | ||
COPY --chown=$UID:$GID Gemfile* /usr/src/app/ | ||
|
||
ENV RAILS_LOG_TO_STDOUT true | ||
ENV BUNDLE_PATH /gems | ||
|
||
WORKDIR /usr/src/app | ||
RUN gem install 'bundler:2.1.4' | ||
RUN bundle install | ||
|
||
COPY --chown=$UID:$GID . /usr/src/app | ||
|
||
USER $UNAME | ||
RUN mkdir -p /usr/src/app/data/build |
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
Oops, something went wrong.