I have two laravel projects, this projects are two differents containers in docker:
First Project:
potatoes:
build:
context: ./potatoes
dockerfile: Dockerfile
args:
environment: local
ports:
- '5000:80'
depends_on:
- redis
- potatoesdb
- elasticsearch
volumes:
- ./potatoes:/var/www/html/app
Second Project:
beanstalk:
build:
context: ./beanstalk
dockerfile: Dockerfile
args:
environment: local
ports:
- '5004:80'
depends_on:
- redis
- beanstalkdb
volumes:
- ./beanstalk:/var/www/html/app
links:
- potatoes
Each one has its docker configuration with supervisor:
[supervisord]
nodaemon = true
logfile = /tmp/supervisord.log
logfile_maxbytes = 0
[program:php-fpm]
command=/usr/local/sbin/php-fpm --nodaemonize --fpm-config /usr/local/etc/php-fpm.conf
numprocs=1
autostart=true
autorestart=false
[program:nginx]
command =/usr/sbin/nginx -g "daemon off;"
stdout_logfile = /dev/stdout
stdout_logfile_maxbytes = 0
stderr_logfile = /dev/stderr
stderr_logfile_maxbytes = 0
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php artisan queue:work redis --sleep=3 --tries=3
autostart=true
autorestart=true
numprocs=3
redirect_stderr=true
stdout_logfile=/tmp/worker.log
I need one thing and I don't know if it can be done.
In my first Project I created a Job: TestJobQueue, when this job finished, it have to run a job in another project, where I created a job with a same name "TestJobQueue"..
I don`t know how to call a same queue from first project to second project, cause I don´t know if a docker problem, worker problem or it just can´t.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire