I have an app made with Symfony and SonataNotificationBundle. I need to deploy the app on amazon Beanstalk to execute a command to activate the consumers that I have made with sonataNotification.
Currently I have two files in the .ebextensions folder: composer.config notifications.config
the composer.config works correctly, I have located the error in the notifications.config. This only has three lines:
commands:
02execute_consumers:
command: php app/console --env=prod sonata:notification:start
Beanstalk returns this error in the deployment:
[2017-06-13T05:48:05.389Z] INFO [7883] - [Application update aws-ffm-bgg34@43/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_1_PROYECTO/Command 02execute_consumers] : Activity execution failed, because: Could not open input file: app/console
(ElasticBeanstalk::ExternalInvocationError)
What I understand here is that the directory where the deployment environment is located is not that of the app, so it does not find the app / console file.
On a local computer, the only thing you would have to do is go to the application directory, and execute that same command:
php app/console --env=prod sonata:notification:start
How can I do this in Beanstalk? What would the directory be? Or am I forgetting something basic?