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 年前249 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则