.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.

질문됨 일 년 전261회 조회
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.

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠