【发布时间】:2018-08-06 03:01:35
【问题描述】:
我正尝试在成功部署之后在/var/app/current 目录中创建一个文件。我已经在.ebextensions 下创建了一个配置文件,但该文件没有被创建。我认为它总是被覆盖,因为文件首先在/tmp/deployment/application 签出。我不想在我的 VCS 中跟踪文件。
我的配置文件:
# .ebextensions/create_file.config
files:
"/var/app/current/src/webapp/dist/testfile.html":
mode: "000644"
owner: nodejs
group: nodejs
content: |
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<h1>foo</h1>
<body>
</html>
【问题讨论】:
-
如果您的完整文件夹不存在,您尝试创建它:
commands: create_post_dir: command: "mkdir /var/app/current/src/webapp/dist/" ignoreErrors: true
标签: amazon-web-services deployment amazon-elastic-beanstalk