Closed amcastror closed 5 years ago
Sorry I inherited the documentation and project, and although I use it in production, I have not had reason to dig too deep into things that just work or dont concern my project yet.
I too, like you, have 10s of docker containers that are my workers, all running the same docker image, and my root_dir is set the same on all of them.
I have a frontend docker container which is a different app, that places jobs in the queue, and THAT needed to have the same root_dir in the job, same as the root_dir for the WORKER docker images.
does that help?
Hi @PhilETaylor, from what I understand from your answer all your docker images have the same root_dir, and your frontend docker also has the same root_dir. So bottom line, all of them must have the same root_dir. True?
Just to clarify, having the same root_dir means to be able to access the same physical folder or just having the same configuration?
Thanks!
My frontend and worker images have different paths to the app.
In my FRONTEND docker images, I have the root_dir configured as the full path to app folder (Symfony 3) of my WORKERS IMAGE
/var/www/app
When resque picks up a job in the workers, it then knows which symfony to boot and use based on that path.
Basically when you add a job to the queue (in my case using the FRONTEND docker image) the job definition contains the root_dir that resque, when running on the workers, expect, so the FRONTEND needs to be able to set that in the JOB.
Ok, now I get it. Thanks a lot.
Awesome.
Hi,
The docs state that:
(at the bottom of Optional, set configuration)
In other words, two different installations of a project with workers must live in the same server? Can't I have then workers wrapped into Docker containers to process jobs?
Maybe what this means is that if I have two different apps, then to process jobs from these two apps I need workers that share the root_dir? I just can't figure this out.
Thanks a lot!