每个命令都在自己的shell中执行.所以出口不起作用.你需要把它放进~/.bash_profile
去以确保它与每个新命令一起执行.
commands: set_path: test: test ! -f /opt/elasticbeanstalk/.post-provisioning-complete command: echo 'export PATH=$PATH:/var/www/html/vendor/bin' >> /root/.bash_profile
要使它只运行一次,添加以下文件:
.ebextensions/99_finalize_setup.config:
commands: 99_write_post_provisioning_complete_file: command: touch /opt/elasticbeanstalk/.post-provisioning-complete