Elastic Beanstalk doesn't run commands in the background

0

I created config file "z.config" in .ebextensions with the following in it:

container_commands:
00queue:
command: "nohup php /var/app/ondeck/artisan queue:work > text.out 2> error.err < /dev/null &"

The deployment process gets stuck for almost an hour, and after a while it redeploy itself again!!
When SSHing to the EC2 I ran the command with no errors.

Is there any thing wrong with the syntax or Is there another way to run the command in the background without going to infinite deploying loop??

I tried also "php /var/app/ondeck/artisan queue:work &", "php artisan queue:work &", "php artisan queue:work < /dev/null &"
None worked as expected.
I have other configurations and commands and they're working great except that one.

질문됨 5년 전248회 조회
2개 답변
0

Any one ?!

답변함 5년 전
0

I fixed it.
The command that worked fine for me is:
"nohup php artisan queue:work > /dev/null 2> /dev/null < /dev/null &"

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠