Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Domain parameter not defined with supervisor #21

Closed
nechin opened this issue Mar 17, 2020 · 5 comments
Closed

Domain parameter not defined with supervisor #21

nechin opened this issue Mar 17, 2020 · 5 comments

Comments

@nechin
Copy link

nechin commented Mar 17, 2020

Hi.

I use a Docker with worker container and supervisor in it. In worker config file I defined the command=/usr/local/bin/php /var/www/html/artisan queue:work --sleep=3 --tries=3 --domain=domain.com. The supervisor defined as ENTRYPOINT in Dockerfile (with worker config).
So in detectDomain method the argv parameter don't have the domain key. Therefore, the scheduler always uses the .env config file.

Any ideas?

Thanks.

@gecche
Copy link
Owner

gecche commented Mar 17, 2020

I have used Docker but I'm not very expert... anyway... Do you mean you use supervisor together with the Laravel schedule:run command?
In this case, you should add the domain option to the schedule:run command too and so run a scheduler for each domain.

But maybe I totally did not understand your problem.

Cheers

Giacomo

@nechin
Copy link
Author

nechin commented Mar 18, 2020

I can use domain option only in the worker file (see below). Not in schedule:run command (it used in dockerfile like RUN crontab /etc/crontabs/laravel.cron).
In any case, keep this option in mind. It is not compatible with your extension.

Thanks.

@nechin nechin closed this as completed Mar 18, 2020
@MrCanan
Copy link

MrCanan commented May 2, 2024

Hi,
But, is the --option in scheduler:run works outside/without docker for you?
Because it seems not working in my case ?
Or I missed something ^^
Because the artisan command with --domain option works in terminal, same with scheduler:run command, but not of in cron (crontab -e)
Best regards

@gecche
Copy link
Owner

gecche commented May 3, 2024

Hi,

I'm not sure I understood your question.... however I use my package together with crons and WITHOUT docker in a lot of projects.
The trick is that you have to launch one cron process for each domain, for example this is a crontab line:

`

          • php PATH_TO_ARTISAN/artisan schedule:run --domain=DOMAIN_NAME >> /dev/null 2>&1
            `

Cheers

Giacomo

@MrCanan
Copy link

MrCanan commented May 3, 2024

Hi,
Thank you for your answer,
I do the same,
My artisan command works alone, but nothing in cron,
So I have perhaps an issue with new scheduler system of Laravel 11

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants