.NET 6 MVC (C#) app not deploying .ebextensions on elastic beanstalk host

0

I'm having trouble with my .ebextensions files deploying with my .NET application to my elastic beanstalk environment. I've verified the yaml, even using some test code to simplify things.

commands:
  create_test_file:
    command: "echo 'This is a test file' > /tmp/test.txt"

Directory & file is included in the publish zip file (file is copy always). When I publish, the above test.txt file is not created (nor any other configurations have worked). I also don't see anything in the logs references ebextensions. I'm publishing with the AWS toolkit "Publish to AWS Elastic Beanstalk...", all other changes do get deployed (i.e. code changes), just not .ebextensions.

Edit: Tested another configuration file in my .ebextensions folder and it seemed to work, but for a different path:

files:
    "/etc/httpd/conf.d/filelimit.conf":
        mode: "000755"
        owner: root
        group: root
        content: |
            LimitRequestBody 102400

Copied that file and created a second .conf file:

files:
    "/etc/nginx/conf.d/proxybuffer.conf":
        mode: "000755"
        owner: root
        group: root
        content: |
            proxy_buffer_size 256k

And this one did NOT work. Then I modified the same file to change nginx to httpd to drop this same file in that folder, and it worked.

So it's something to do with /etc/nginx - looking at permissions all of the folders have the same drwxr-xr-x (755), so that doesn't seem to be it. Is there some additional protection on the nginx folder? Going to maybe try putting the file in source and copying it.

質問済み 1年前268ビュー
1回答
0
承認された回答

Resolved:

For some reason using .ebsettings and yaml did not work only for the nginx conf.d folder. Was really strange, never got to the bottom of why. It would create and/or copy files to other folders no problem.

Solution: Added a .platform folder to the root of my .net project. .platform\nginx\confd\nginx-proxybuffers.conf containing the nginx config modifications. That worked for some reason. Problem solved for folks who may have this problem in the future.

回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ