Mysql in docker not found

Hi all,
i’m trying to setup sharetribe with docker but encountered some problems.
The “sharetribe_worker” container crashes with a lot of mysql errors:
Mysql2::Error: Table 'sharetribe_production.delayed_jobs' doesn't exist

Symptoms/What I did so far:

  • edit the database.docker.yml and copied it to “githubclonepath”/config/database.yml
  • edit the config.default.yml and copied it to “githubclonepath”/config/config.yml
  • edit network-adapter config and started/build container with:
    docker-compose -f docker-compose.yml -f docker-compose.app.yml up -d
  • started crashed worker again, and executed db creation:
    app@a546442f49e1:/opt/app$ RAILS_ENV=production bundle exec rake db:create /opt/app/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/configuration/default_source.rb:675: warning: key :disable_mongo is duplicated and overwritten on line 987 sharetribe_production already exists

I assume my database connection configuration is correct? Database was created by me beforehand with the credentials set in DB config file.

  • Than I tried to initialzie the database with:
    app@a546442f49e1:/opt/app$ RAILS_ENV=production bundle exec rake db:structure:load /opt/app/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/configuration/default_source.rb:675: warning: key :disable_mongo is duplicated and overwritten on line 987 rake aborted! failed to execute: mysqlPlease check the output above for any errors and make sure thatmysqlis installed in your PATH and has proper permissions.

bundler tolled me, that mysql2 is installed with Version 0.4.4.
So, did I do something wrong? Did I miss something?

Thank you very much!

I also have this same problem but i’m trying to deploy to Heroku.

No idea as to what could be causing it.

When I remember correctly, I fixed it by adding the following packages to the appropriate line (line 47 in my version) in the Dockerfile:
RUN apt-get install -y nginx mysql-client libmysqlclient-dev