gpt4 book ai didi

amazon-web-services - 在AWS Beanstalk上部署docker仅提供html文件,不提供其他文件

转载 作者:行者123 更新时间:2023-12-02 18:39:03 31 4
gpt4 key购买 nike

我试图将该项目部署到AWS Elastic Beanstalk:https://github.com/coralproject/talk dockerfile公开端口5000,并且我还定义了环境变量,也全部使用端口5000。

当我使用推荐的docker-compose文件(https://coralproject.github.io/talk/installation-from-docker/#installing)在本地运行项目时,在本地一切正常。

但是,当我将应用程序部署到Beanstalk时,将提供html页面并加载正常,但是在本地引用的其他文件(例如我的bundle.js和favicon文件)返回502。

我想念什么?

可能相关的日志:

/var/log/eb-activity.log cat: /var/app/current/Dockerrun.aws.json: No such file or directory 8c17e6ddb0f842e592940a3aa67d0f39ec8702eb4ad6c3f9b876fc33b7f02ddc [2018-02-11T08:29:26.836Z] INFO [24507] - [Application update app-5d978-180211_092600@12/AppDeployStage1/AppDeployEnactHook/01flip.sh] : Starting activity... [2018-02-11T08:29:28.428Z] INFO [24507] - [Application update app-5d978-180211_092600@12/AppDeployStage1/AppDeployEnactHook/01flip.sh] : Completed activity. Result: nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/sites-enabled/elasticbeanstalk-nginx-docker-proxy.conf:11
Stopping nginx: [ OK ] Starting nginx: nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/sites-enabled/elasticbeanstalk-nginx-docker-proxy.conf:11
[ OK ] cat: /var/app/current/Dockerrun.aws.json: No such file or directory /opt/elasticbeanstalk/hooks/common.sh: line 95: [: 1: unary operator expected iptables: Saving firewall rules to /etc/sysconfig/iptables: [ OK ]



Nginx访问日志仅显示html请求,而不显示其他文件

/var/log/nginx/access.log 95.90.245.122 - - [11/Feb/2018:22:43:00 +0000] "GET / HTTP/1.1" 302 72 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" 95.90.245.122 - - [11/Feb/2018:22:43:00 +0000] "GET /admin/install HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" 95.90.245.122 - - [11/Feb/2018:22:45:57 +0000] "GET /admin/install HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" 95.90.245.122 - - [11/Feb/2018:22:46:04 +0000] "GET / HTTP/1.1" 302 72 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" 95.90.245.122 - - [11/Feb/2018:22:46:04 +0000] "GET /admin/install HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"



访问页面时,我看到了以下内容:

install:45 GET https://talk-now.us-east-1.elasticbeanstalk.com:5000/static/coral-admin/bundle.js net::ERR_CONNECTION_REFUSED :5000/public/img/favicon-32x32.png:1 GET https://talk-now.us-east-1.elasticbeanstalk.com:5000/public/img/favicon-32x32.png net::ERR_CONNECTION_REFUSED :5000/public/img/favicon-16x16.png:1 GET https://talk-now.us-east-1.elasticbeanstalk.com:5000/public/img/favicon-16x16.png net::ERR_CONNECTION_REFUSED :5000/public/img/favicon-96x96.png:1 GET https://talk-now.us-east-1.elasticbeanstalk.com:5000/public/img/favicon-96x96.png net::ERR_CONNECTION_REFUSED

最佳答案

问题是您在存储库的根级别缺少 Dockerrun.aws.json 文件。对于Beanstalk来说,确定如何执行项目中的容器集是必需的。

另请注意,此文件中各节的格式与Amazon ECS Task definitions相似

关于amazon-web-services - 在AWS Beanstalk上部署docker仅提供html文件,不提供其他文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48729679/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com