Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Custom supervisor configs #692

Closed
stu177 opened this issue Mar 30, 2020 · 9 comments
Closed

Custom supervisor configs #692

stu177 opened this issue Mar 30, 2020 · 9 comments
Assignees

Comments

@stu177
Copy link

stu177 commented Mar 30, 2020

ISSUE TYPE

  • Feature request

SUMMARY

Custom supervisor configs

Goal

Being able to add custom supervisor conf files to Devilbox would be useful for working with queues in Laravel. I can see that supervisor is installed within the PHP container but I can't see a way of adding a new conf.

@stu177 stu177 added the feature label Mar 30, 2020
@cytopia
Copy link
Owner

cytopia commented Mar 30, 2020

@stu177 can you explain what you would like to run with supervisor and also why with supervisor itself?

There is already a possibility to run things: https://devilbox.readthedocs.io/en/latest/autostart/custom-scripts-per-php-version.html

Let me know if this solves your issue already.

@cytopia cytopia self-assigned this Mar 30, 2020
@stu177
Copy link
Author

stu177 commented Mar 30, 2020

@cytopia It's mainly to replicate the environment we have on a production server. The conf we run looks like:

[program:queue-production]
directory=/home/website/www/production/current/
command=php artisan queue:work --tries=3 --sleep=3 --daemon
process_name=%(program_name)s_%(process_num)02d
autostart=true
autorestart=true
user=user
numprocs=4
redirect_stderr=true
stdout_logfile=/home/website/www/production/current/storage/logs/queue.log

I can always run the command manually on the box to run the artisan command but it's more of a task to mirror the live environment for testing.

@stale
Copy link

stale bot commented Jun 28, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the issue:stale This issue has become stale and is marked for auto-close label Jun 28, 2020
@cytopia cytopia removed the issue:stale This issue has become stale and is marked for auto-close label Jul 2, 2020
@stale
Copy link

stale bot commented Oct 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the issue:stale This issue has become stale and is marked for auto-close label Oct 2, 2020
@cytopia cytopia removed the issue:stale This issue has become stale and is marked for auto-close label Oct 2, 2020
@cytopia
Copy link
Owner

cytopia commented Nov 21, 2020

@stu177 Will be addressed here: devilbox/docker-php-fpm#181

@cytopia
Copy link
Owner

cytopia commented Nov 22, 2020

Fix released here: #757

@masiorama
Copy link

Hello @stu177 how did you configure supervisor on devilbox? I encountered this argument here https://laravel.com/docs/9.x/queues#configuring-supervisor and I would like to try to do the same you probably already accomplished.
Thanks!

@izdrail
Copy link

izdrail commented Apr 15, 2023

[program:queue-production]
directory=/home/website/www/production/current/
command=php artisan queue:work --tries=3 --sleep=3 --daemon
process_name=%(program_name)s_%(process_num)02d
autostart=true
autorestart=true
user=user
numprocs=4
redirect_stderr=true
stdout_logfile=/home/website/www/production/current/storage/logs/queue.log

Create a file in the /path/devilbox/supervisor/
named queue.conf
restart the docker devilbox

[program:queue-production]
directory=/shared/httpd/news/
command=php artisan queue:work --tries=3 --sleep=3 --daemon
process_name=%(program_name)s_%(process_num)02d
autostart=true
autorestart=true
numprocs=10
redirect_stderr=true
stdout_logfile=/shared/httpd/news/storage/logs/queue.log

and replace /news/to your project

@masiorama
Copy link

@Cornatul thanks, I will give it a try asap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants