Skip to content

Commit

Permalink
ruby v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexskr committed Mar 5, 2024
1 parent d047de0 commit d2f91c4
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 7 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \
raptor2-utils \
&& rm -rf /var/lib/apt/lists/*

# The Gemfile Caching Trick
RUN mkdir -p /srv/ontoportal/ncbo_ontology_recommender
COPY *.gemspec Gemfile* /srv/ontoportal/ncbo_ontology_recommender/
RUN mkdir -p /srv/ontoportal/bundle
COPY Gemfile* *.gemspec /srv/ontoportal/ncbo_ontology_recommender/

WORKDIR /srv/ontoportal/ncbo_ontology_recommender

RUN gem update --system
RUN gem install bundler
ENV BUNDLE_PATH /bundle
ENV BUNDLE_PATH=/srv/ontoportal/bundle
RUN bundle install

COPY . /srv/ontoportal/ncbo_ontology_recommender
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'

gem 'cube-ruby'
gem 'faraday', '~> 2.0'
gem 'faraday'
gem 'ffi'
gem 'oj', '~> 3.0'
gem 'rake', '~> 10.0'
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ PLATFORMS

DEPENDENCIES
cube-ruby
faraday (~> 2.0)
faraday
ffi
goo!
minitest (~> 4.0)
Expand Down
55 changes: 55 additions & 0 deletions dip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: '7.1'

# Define default environment variables to pass
# to Docker Compose
#environment:
# RAILS_ENV: development

compose:
files:
- docker-compose.yml

interaction:
# This command spins up a ontologies_api container with the required dependencies (solr, 4store, etc),
# and opens a terminal within it.
runner:
description: Open a Bash shell within a ontologies_api container (with dependencies up)
service: ruby
command: /bin/bash

# Run a Rails container without any dependent services (useful for non-Rails scripts)
bash:
description: Run an arbitrary script within a container (or open a shell without deps)
service: ruby
command: /bin/bash
compose_run_options: [ no-deps ]

# A shortcut to run Bundler commands
bundle:
description: Run Bundler commands
service: ruby
command: bundle
compose_run_options: [ no-deps ]

# A shortcut to run unit tests
test:
description: Run minitest unit tests
service: ruby
command: bundle exec rake test

test-ag:
description: Run minitest unit tests
service: ruby-ag
command: bundle exec rake test


'redis-cli':
description: Run Redis console
service: redis-ut
command: redis-cli -h redis-ut

#provision:
#- dip compose down --volumes
#- dip compose up -d solr 4store
#- dip bundle install
#- dip bash -c bin/setup
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
build:
context: .
args:
RUBY_VERSION: '2.7'
RUBY_VERSION: '3.0'
volumes:
- bundle:/bundle
- .:/srv/ontoportal/ncbo_ontology_recommender
Expand All @@ -27,7 +27,7 @@ services:
command: "bundle exec rake test TESTOPTS='-v'"

solr-ut:
image: ontoportal/solr-ut:0.0.2
image: ontoportal/solr-ut:0.1.0

redis-ut:
image: redis
Expand Down

0 comments on commit d2f91c4

Please sign in to comment.