How to use a third-party artist to access the downloaded file in a rails application on a Dokku server

I am using the sidekiq plugin: https://github.com/bigboxsoftware/dokku-sidekiq to enable sidekiq on the server. And the problem is that the worker cannot access the file in any application folder.

Like the README plugin said

Adds a post-deploy hook to Dokku to automatically deploy a container running a Sidekiq worker 

I'm not sure if this means my application and sidekiq are working in a different container? I tried to use the mounted folder to store the downloaded file

 cat /home/dokku/home/PERSISTENT_STORAGE /home/dokku/shared/temp:/app/public/temp 

But he still cannot work.

In the rails console, I can use File.open('public/temp/file') to open the file, but after using Sidekiq::Worker.new('public/temp/file') it raises the error Errno::ENOENT: No such file or directory .

What can i do now?

+6
source share

Source: https://habr.com/ru/post/989266/


All Articles