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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ