excellalabs / open-cabinet

OpenCabinet is a tool for the public to find interactions between the medicine that they and their family are taking using data directly from the FDA
https://opencabi.net
Other
33 stars 10 forks source link

WIP - Docker native and revive #339

Open yunghuffy opened 6 years ago

yunghuffy commented 6 years ago

The idea here was to run this via simple docker compose. Couple of notes.

You'll need to run migrations from docker-compose run web ... I found it simple enough to run bash and test out different migrations techniques. After docker-compose up db the following were run in a web container with bash.

rake db:create db:migrate
yunghuffy commented 6 years ago

Get up and running

  1. Update flip gem to just pull from rubygems
  2. Remove (for now) the line with flip in it from app/assets/javascripts/application.js
  3. Create an API key at FDA
  4. Create secrets.yml. Update DATABASE_IP to db, and open_fda_import_key to your key
    default: &default
    secret_key_base: d9c69d37907ea27c1970faf75661433eb8ac11e725bece21fc32ca76274c40b0bb404b09548aa7441e1f801a04f10612c1d104b5388d41c525a9012621dcae01
    DATABASE_IP: db
    DATABASE_USERNAME: DB_USERNAME
    DATABASE_PASSWORD: DB_PASSWORD
    BASIC_AUTH_USERNAME: XXXXX
    BASIC_AUTH_PASSWORD: XXXXX
    open_fda_import_key: your API key
  5. docker-compose up
  6. docker-compose run web bundle install
  7. docker-compose run bundle exec rails g flip:install
  8. docker-compose run bundle exec rake db:create db:migrate
  9. Remove 'flip' from app/assets/javascripts/application.js (again, for now)
  10. Restart the web container with docker-compose