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

Feature: Add docker environment for the UI #229

Closed

Conversation

syphax-bouazzouni
Copy link
Contributor

@syphax-bouazzouni syphax-bouazzouni commented Nov 21, 2022

What

This PR add a docker environement to the UI app, without installing the depencies (MySQL, Memcached, ruby and rails, node, esbuild, ..)

Requirements

Install docker and docker-compose, see https://docs.docker.com/compose/install/

Contains

The docker

  1. Mysql
  2. Memcached
  3. Ruby 2.7.5 & Rails app
  4. Node and Esbuild

Running the app

Configuration:

cp .env.example .env
cp config/database.yml.sample config/database.yml

Fill your configuration files https://github.com/ncbo/bioportal_web_ui/blob/master/config/bioportal_config_env.rb.sample

Build everything:

The first time you run this it's going to take 5-10 minutes depending on your internet connection speed and computer's hardware specs. That's because it's going to download a few Docker images and build the Ruby + Yarn dependencies (1,5 GB for all).

docker compose up --build

Create DB

bin/run bin/rails db:setup

Run the web server:

bin/run bin/rails s -b 0.0.0.0

bin/run is wrapper for docker compose exec web sh -c "your command to run inside the container"

What can be done next

  • Link to a local ontologies_api_client project (bundle config local.ontologies_api_client path_to_the_local_project)
  • A better usage .env file in the rails app configuration files
  • Use docker dip
  • Optimize the docker to use multiple workers (and be faster)
  • ...

@syphax-bouazzouni syphax-bouazzouni changed the title Add docker environment for the UI Feature: Add docker environment for the UI Nov 21, 2022
@syphax-bouazzouni
Copy link
Contributor Author

syphax-bouazzouni commented Jan 4, 2023

Some news about this,
An official Dockerfile for Rails came out these days

  • Docked Rails CLI

    Setting up Rails for the first time with all the dependencies necessary can be daunting for beginners. Docked Rails CLI uses a Docker image to make it much easier, requiring only Docker to be installed.

  • Add default Dockerfiles

    This pull request adds Docker files by default to new apps: Dockerfile, .dockerignore, bin/docker-entrypoint. These files can be skipped with --skip-docker. They're intended as a starting point for a production deploy of the application. Not intended for development (use the above mentioned Docked Rails for that). You can see more details about using it on the pull request.

source https://rubyonrails.org/2022/12/30/this-week-in-rails-this-year-in-rails-a-summary-of-2022-42e99b0f

jvendetti and others added 24 commits June 23, 2023 16:21
Universal Analytics -> Google Analytics 4 migration
Addresses the 500 errors reported in #269
Code refactoring for issues with class permalinks
Remove $LEGACY_REST_URL environment variable and associated code
@syphax-bouazzouni
Copy link
Contributor Author

replaced by ontoportal#21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants