I have problem with execute command after deploy, i have some node.js project and script, this script use some bin from node_modules, if i write my command for script in .ebextensions/.config he execute before npm install and return error ("node_modules/.bin/some": No such file or directory
). How i can execute command after deploy. Thanks.
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- How to generate 12 digit unique number in redshift
- Use awslogs with kubernetes 'natively'
- google-drive can't get push notifications
- Failed at the electron@1.8.2 postinstall script
相关文章
- node连接远程oracle报错
- Right way to deploy Rails + Puma + Postgres app to
- how many objects are returned by aws s3api list-ob
- How can make folder with Firebase Cloud Functions
- AWS S3 in rails - how to set the s3_signature_vers
- Passthrough input to output in AWS Step Functions
- Override env values defined in container spec
- @angular-cli install fails with deprecated request
I found the following solution
I add to beanstalk config next command:
This commands create(if not exist) folder for post-hooks scripts and adds bash script. Scripts in this folders execute only after npm install, this very important for my problem.
Thanks to this guy http://junkheap.net/blog/2013/05/20/elastic-beanstalk-post-deployment-scripts/
If you read the AWS ebextensions documentation they mention the execution, specifically where they mention that all commands are executed before the application version is deployed.
If you deploy it for a second time it should work; this is because your application is already unpacked. This however is not a working solution because every new instance that is spawned will error.
create a file called
.ebextensions/post_actions.config
:this will be executed after the code was extracted, but before it was launched.