Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with BioPortal release 6.20.0 and Alignement with Agroportal work #26

Merged
merged 36 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c8bdede
Merge branch 'ontoportal-master' into sync-agroportal
alexskr Oct 17, 2024
0fe90ba
add application-esbuild to asset manifest
alexskr Oct 17, 2024
0fce2aa
use ncbo/ontologies_api_ruby_client
alexskr Oct 17, 2024
eb6a4b4
Disable BPIDResolver
alexskr Oct 18, 2024
4a972b5
pin gem for compatibility
alexskr Oct 18, 2024
45f5952
Merge pull request #339 from ontoportal/master
alexskr Oct 22, 2024
b6cfd5a
disable tests for features that are not yet implemented
alexskr Oct 22, 2024
fe3303c
Merge pull request #340 from ontoportal/master
alexskr Oct 23, 2024
9fa10f2
remove temp workaround
alexskr Oct 23, 2024
6466658
Add option to test a specific set of ontologies
alexskr Oct 23, 2024
c76bdbe
Merge pull request #341 from ncbo/feature/new_option_list_of_ontologi…
alexskr Oct 24, 2024
f730111
docker refactor
alexskr Oct 29, 2024
6d4169a
Initial commit of change request attribution
jvendetti Oct 31, 2024
571410b
Add a base class for common methods
jvendetti Nov 1, 2024
fdab109
Fix unit tests
jvendetti Nov 1, 2024
14942a1
Convert some UJS to Turbo Streams and Stimulus
jvendetti Nov 7, 2024
f5c14ea
config file update
alexskr Nov 7, 2024
78cb4ca
do not include capistrano deploy configs
alexskr Nov 7, 2024
1f6e74c
Merge master into feature/kgcl-issue-attribution/323: resolve conflic…
jvendetti Nov 7, 2024
a5fdb47
publish image to hub.docker
alexskr Nov 7, 2024
7bca691
Fix an issue with login page rendering
jvendetti Nov 7, 2024
244a222
Restore create.js.erb
jvendetti Nov 8, 2024
156d1b8
Merge pull request #344 from ncbo/feature/kgcl-issue-attribution/323
jvendetti Nov 8, 2024
1ef3ad4
create test env config file if not present
alexskr Nov 8, 2024
d9dd99e
add test
alexskr Nov 8, 2024
0bf4e3b
remove deprecated setting
alexskr Nov 8, 2024
35d77e8
create database.yml
alexskr Nov 8, 2024
3dfe641
remove worklow for running unit tests
alexskr Nov 8, 2024
e6fd546
Merge pull request #342 from ncbo/docker-refactor1
alexskr Nov 9, 2024
11513aa
Merge branch 'master' into sync-agroportal
alexskr Nov 9, 2024
86b9c6b
prevent simple component from initializing if its already done
alexskr Nov 9, 2024
83c3543
set defalut theme if $UI_THEME is not set
alexskr Nov 13, 2024
b5aa0da
fixes for #345 - display issues with jump to search
mdorf Nov 13, 2024
a21da66
fixed a tree term display issue with flat ontologies
mdorf Nov 14, 2024
82b8a40
fixed a visualization issue with term page
mdorf Nov 14, 2024
550ef26
re-implemented the jump_to fix in the new code
mdorf Nov 14, 2024
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
7 changes: 6 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.git/
.github/
log/*
!log/.keep
app/assets/builds/*
Expand All @@ -21,5 +22,9 @@ yarn-error.log
yarn-debug.log*
.yarn-integrity

# Ruby version is set in Dockerfile
.ruby-version

config/credentials/*
config/credentials.yml.enc
config/credentials.yml.enc
config/deploy/*
4 changes: 3 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ API_IMAGE_REPOSITORY=agroportal
## Image tag/version from which the ontoportal api will be built
API_IMAGE_TAG=master


## Tests
# List of Ontologies to test in test/controllers/ontologies_controller_test.rb
# ONTOLOGIES_TO_TEST="NCIT,GO,SNOMEDCT"
40 changes: 40 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Docker Image to hub.docker.com

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: bioportal/bioportal_web_ui

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
68 changes: 35 additions & 33 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
# Make sure it matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.2.0
FROM ruby:${RUBY_VERSION}-alpine

# Install libvips for Active Storage preview support
RUN apk add --no-cache build-base \
libxml2-dev \
libxslt-dev \
mariadb-dev \
git \
tzdata \
nodejs yarn \
less \
bash \
docker \
docker-compose \
&& mkdir /node_modules

# Rails app lives here
ARG RUBY_VERSION=3.2
FROM ruby:${RUBY_VERSION}-slim-bookworm

WORKDIR /app

# Set production environment
RUN bash -c "set -o pipefail && apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libxml2 \
libxslt-dev \
libmariadb-dev \
git \
curl \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key -o /etc/apt/keyrings/nodesource.asc \
&& echo 'deb [signed-by=/etc/apt/keyrings/nodesource.asc] https://deb.nodesource.com/node_20.x nodistro main' | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends nodejs \
&& corepack enable \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man \
&& mkdir /node_modules"

ARG RAILS_ENV="production"
ARG NODE_ENV="production"
ARG BUNDLE_WITHOUT="development test"

ENV RAILS_LOG_TO_STDOUT="1" \
RAILS_SERVE_STATIC_FILES="true" \
RAILS_ENV="${RAILS_ENV}" \
NODE_ENV="${NODE_ENV}" \
BUNDLE_PATH=/usr/local/bundle \
BUNDLE_WITHOUT="${BUNDLE_WITHOUT}"

RUN gem update --system 3.4.22 # the 3.4.22 can be removed if we support Ruby version > 3.0

COPY . .

#PATH="${PATH}:/node_modules/.bin"
COPY Gemfile* .
RUN bundle install
RUN yarn install && yarn build


COPY package.json *yarn* .
RUN yarn install

RUN cp config/bioportal_config_env.rb.sample config/bioportal_config_production.rb
RUN cp config/bioportal_config_env.rb.sample config/bioportal_config_development.rb
RUN cp config/database.yml.sample config/database.yml
COPY . .

# Precompile bootsnap code for faster boot times
RUN bundle exec bootsnap precompile --gemfile app/ lib/
RUN cp config/bioportal_config_env.rb.sample config/bioportal_config_production.rb \
&& cp config/bioportal_config_env.rb.sample config/bioportal_config_development.rb \
&& cp config/bioportal_config_env.rb.sample config/bioportal_config_test.rb \
&& cp config/database.yml.sample config/database.yml

RUN SECRET_KEY_BASE_DUMMY="1" ./bin/rails assets:precompile
RUN if [ "${RAILS_ENV}" != "development" ]; then \
bundle exec bootsnap precompile --gemfile app/ lib/ && \
SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile; fi

ENV BINDING="0.0.0.0"
EXPOSE 3000

CMD ["bash"]
CMD ["rails", "s"]
24 changes: 14 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ gem 'sassc-rails' # sass-rails replacement
gem 'terser' # uglifier replacement

# Bootstrap front-end framework
gem 'bootstrap', '~> 5.2.3'
gem 'bootstrap', '~> 5.2.3'

# jQuery integration for Rails
gem 'jquery-rails'
Expand Down Expand Up @@ -67,7 +67,6 @@ gem 'dalli'
gem 'graphql', '~> 2.0.27'
gem 'graphql-client'


# Haml template engine for Ruby on Rails
gem 'haml', '~> 5.1'

Expand Down Expand Up @@ -104,12 +103,21 @@ gem 'flag-icons-rails', '~> 3.4'
gem 'iso-639', '~> 0.3.6'

# Custom API client
gem 'ontologies_api_client', git: 'https://github.com/ontoportal-lirmm/ontologies_api_ruby_client.git', branch: 'master'
gem 'ontologies_api_client', github: 'ncbo/ontologies_api_ruby_client', tag: 'v2.4.0'

# compatibilty pin https://github.com/ncbo/bioportal_web_ui/issues/293
gem 'base64', '0.1.0'
gem 'rexml', '~> 3'

# Ruby 2.7.8 pinned gems (to remove when migrating to Ruby >= 3.0)
gem 'ffi', '~> 1.16.3'
gem 'net-ftp', '~> 0.2.0', require: false
gem 'net-http', '~> 0.3.2'
# gem 'ffi', '~> 1.16.3'
# gem 'net-ftp', '~> 0.2.0', require: false
# gem 'net-http', '~> 0.3.2'

gem 'ffi'
gem 'net-ftp', require: false
gem 'net-http'


# Multi-Provider Authentication
gem 'omniauth'
Expand All @@ -125,10 +133,6 @@ group :staging, :production, :appliance do

# Error monitoring
gem 'bugsnag', '~> 6.26'

# Logs in JSON format, useful for shipping logs to logstash
# gem 'rackstash', git: 'https://github.com/planio-gmbh/rackstash.git'
# gem 'logstash-logger'
end

group :development do
Expand Down
Loading
Loading