当新实例开始旋转时,Aws Elastic beanstalk ebextensions 不起作用 [英] Aws Elastic beanstalk ebextensions not working when new instance is getting spinned

查看:25
本文介绍了当新实例开始旋转时,Aws Elastic beanstalk ebextensions 不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从过去 1 周起,每当我的旧弹性 beanstalk 实例终止并且 AWS 启动新实例时,它都没有选择我提到的 eb 扩展,就会发生这种情况.

This is happening from last 1 week whenever my old elastic beanstalk instance getting terminated and AWS spinning up new instance its not picking eb extensions where I have mentioned.

files:
    "/etc/nginx/conf.d/proxy.conf" :
        mode: "000755"
        owner: root
        group: root
        content: |
           client_max_body_size 20M;

因此,我无法从我的 API 上传任何视频.

due to which I am not able to upload any video from my APIs.

推荐答案

这可以使用 .platform 文件夹来实现.

This can be achieved using .platform folder.

.platform/
         nginx/
              conf.d/
                    proxy.conf
         00_myconf.config

文件 1 的内容 - proxy.conf(在 .platform/nginx/conf.d/ 文件夹内)

Content of File 1 - proxy.conf (Inside .platform/nginx/conf.d/ folder)

client_max_body_size 50M;

文件 2 的内容 - 00_myconf.config(在 .platform/ 文件夹内)

Content of File 2 - 00_myconf.config (Inside .platform/ folder)

container_commands:
  01_reload_nginx:
    command: "service nginx reload"

将您的应用重新部署到弹性 beanstalk,它将为所有新的弹性 beanstalk 实例提供此配置.

Redeploy your app to elastic beanstalk and it will provide this configuration to all the new elastic beanstalk instances.

这篇关于当新实例开始旋转时,Aws Elastic beanstalk ebextensions 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆