'Elastic Beanstalk with Laravel Envoy
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.
Solution 1:[1]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Daniel Verem |