将 Elastic Beanstalk 与 Amazon Linux 2 结合使用,我尝试为部署(代码部署)和配置部署执行相同的挂钩,而不必在两个不同的位置复制我的代码。
\n根据AWS文档, eb将在.platform/hooks/prebuild部署初始步骤中运行挂钩,但将在.platform/confighooks/prebuild,但在配置部署时将运行挂钩。
我的文件看起来像这样。
\n.platform\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 hooks\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 prebuild\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 00_hookname.sh\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 01_hookname.sh\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 99_basic_auth.sh\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 httpd\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 conf.d\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 elasticbeanstalk\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 directory.conf\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 hardening.conf\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 headers.conf\nRun Code Online (Sandbox Code Playgroud)\n我正在尝试找到一种方法来运行 99_basic_auth.sh 进行部署并配置部署,而无需复制该代码。
\n我有什么办法可以实现这一目标吗?
\n干杯!
\n