openfoodnetwork icon indicating copy to clipboard operation
openfoodnetwork copied to clipboard

Docker environment setup fails to build worker container

Open guidoDutra opened this issue 3 years ago • 0 comments

Description

see this slack thread for more info.

summary: The worker container is not starting succesfully, probably due to migration from delayed_job to sidekiq. Adding the code below fixes this issue

# lib/tasks/jobs.rake

namespace :jobs do
  desc "sidekiq"
  task work: :environment do
   exec("bundle exec sidekiq")
  end
end

but when I try to send an email I get the following error: Error while trying to deserialize arguments: Couldn't find Spree::User with 'id'=10, which is also displayed on the sidekiq portal (/admin/sidekiq):

image

Expected Behavior

worker container should be built correctly and email delivery functionality should work properly (as displayed in the sidekiq portal)

Actual Behaviour

worker container does not start up. If above fix is applied, email delivery does not work properly.

Steps to Reproduce

  1. follow the guides to docker setup
  2. run docker/server or docker-compose up worker and notice that the build fails
  3. apply fixed descibed above to get container running
  4. try to send an email (new user creation, forgot password, etc)
  5. check woker_1 container logs or sidekiq portal to see that the delivery failed with error descibed above

guidoDutra avatar Jul 28 '21 17:07 guidoDutra