Elastic Beanstalk with Laravel Envoy

151 views Asked by At

I write a bash script to run the laravel envoy command in Elastic Beanstalk.

#!/bin/sh
cd /var/app/current/
sudo php vendor/bin/envoy run fillData &

And it gives errors as:

Unsuccessful command execution on the instance

And when accessing the EC2 terminal and running the command, it works fine with no errors.

1

There are 1 answers

0
Mona Alahmadi On BEST ANSWER

I fixed the issue

As if found this WARN in elastic beanstalk AWS

The following instances have not responded in the allowed command timeout time (they might still finish eventually on their own)

As I understand the command continued running and did not stop

I found this article

fixing-a-mysterious-ebextensions-command-time-out-aws-elastic-beanstalk

and I wrote this command in bash file

nohup sudo php vendor/bin/envoy run fillData >/dev/null 2>&1 </dev/null &

nohup command to run in the background, >/dev/null and it will put all the results on
so it will ignore the result you can find more details about >/dev/null