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.

posta 5 anni fa248 visualizzazioni
2 Risposte
0

Any one ?!

con risposta 5 anni fa
0

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

con risposta 5 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande