How can I add PATH on Elastic Beanstalk

Question:

I want to add PATH to packages on eb deploy.
Packages are Installed to /var/www/html/vendor/bin

It can be add by manually through SSH, but how can I add PATH with config file.

I have config file like this .ebextensions/ec2.config. 01-set_timezone works fine 02-set_path dosen’t

Answer:

each command is performed in its own shell. so the export won’t work. you’d need to put it into ~/.bash_profile to ensure it’s executed with every new command.

to make it run only once, add the following file:

.ebextensions/99_finalize_setup.config:

Leave a Reply