Tag: docker弹性beanstalk

在Elastic Beanstalk上部署带有Docker的Flask应用程序:资源创build取消错误

我正在沿着本教程部署一个与Docker Flask应用程序http://blogs.aws.amazon.com/application-management/post/Tx1ZLAHMVBEDCOC/Dockerizing-a-Python-Web-App 我已经在本地做好了一切工作。 然而,当我上传代码到elastic beanstalk并启动应用程序,我得到以下错误: Creating EIP failed Reason: Resource creation cancelled Creating security group named: xyz failed Reason: Resource creation cancelled Stack named 'xyz-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [NewSignupTopic, StartupSignupsTable, AWSEBSecurityGroup, NewSignupQueue, AWSEBEIP] 我已经尝试在上传stream程中修改我的select – 例如,不selectRDS,select单个实例等等。 但是这些似乎并不相关。 任何指针,非常感谢! 。

Docker似乎是在服务器上迁移数据库,而不是在RDS上迁移

我很抱歉,如果我的问题似乎微不足道,但我是一个总noob,当涉及到部署我的rails应用程序。 我试图在弹性beanstalk上使用docker部署我的应用程序。 但部署失败的数据库迁移。 我得到这个消息: Docker container quit unexpectedly after launch: directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? 我正确的想,docker是试图本地连接到PostgreSQL吗? 我没有看到如何告诉docker连接到RDS,因为我的database.yml文件已经指向我的RDS数据库。 另外这里是我的dockerfile: FROM seapy/ruby:2.2.0 RUN apt-get update # Install nodejs RUN apt-get install -qq -y nodejs # Intall software-properties-common for add-apt-repository RUN apt-get install -qq -y software-properties-common # Install Nginx. […]

你如何做一个ElasticBeanstalk部署多个docker集装箱?

我正在做一个eb部署,如下所示: (这是一行,为了可读性我把它分解了) eb create –platform "multi-container-docker-1.7.1-\(generic\)" my-web-and-api –profile default –region us-west-2 –cname mycname –tags STACK=mystack 我得到这个错误: Invalid Dockerrun.aws.json version, abort deployment. 我的Dockerrun.aws.json看起来像这样: { "AWSEBDockerrunVersion": 2, "authentication": { "bucket": "my-docker-config", "key": "Dockercfg" }, "volumes": [], "containerDefinitions": [{ "name": "my-web", "image": "my-web:multi", "environment": [{ "name": "Container", "value": "Node.js" }], "essential": true, "memory": 128, "links": [ "my-api" ], […]

Dockerfile与AWS Elastic Beanstalk上的Dockerrun.aws.json

任何人都可以解释在EB项目中使用这两者中的一个或两个的用例吗? 我从文档中了解到,使用其中一个是可选的,但是我对功耗和缺点并不完全清楚。 任何使用两个好场景? 对于我的EB应用程序,我通过Dockerfile(不是回购)手动构buildDocker镜像并启动node.js服务器。

Elastic Beanstalk上的Docker连接到上游时connect()失败(111:连接被拒绝)

我试图在AWS Elastic Beanstalk上运行一个简单的Sign Up Flask应用程序(这个应用程序: https : //github.com/jay3dec/PythonFlaskMySQLApp— Part1 ),连接到AWS RDS上托pipe的外部MySQL数据库。 该应用程序在本地完美运行(即使从本地应用程序连接到AWS RDS)。 但是当我在命令行打开eb时,我得到: 502 Bad Gateway nginx/1.8.1 当我创buildeb时,我收到警告: WARN Only one EXPOSE directive is allowed, using the first one: 3306 因为在我的Dockerfile中,我有: EXPOSE 3306 EXPOSE 5000 对于日志logging,我有: /var/log/nginx/error.log ————————————- 2016/07/17 15:18:06 [warn] 8928#0: duplicate MIME type "text/html" in /etc/nginx/sites-enabled/elasticbeanstalk-nginx-docker-proxy.conf:11 2016/07/17 15:18:06 [warn] 8934#0: duplicate MIME […]

如何使用密码保护弹性beanstalk docker nginx中部署的django web应用程序

我有一个Django Web应用程序托pipe在AWS Elastic Beanstalk与Docker和Nginx中。 我正在使用主pipe来启动nginx和uwsgi。 需要使用密码保护网站。 我试过使用.htaccess。 htpasswd -cb /etc/nginx/.htpasswd admin admin 并添加了nginxconfiguration location / { auth_basic "Restricted"; auth_basic_user_file /etc/nginx/.htpasswd; uwsgi_pass unix:/var/sockets/api.sock; include /home/docker/uwsgi_params; } 它的工作,但它反复询问密码。 通常htaccess只会在会话中要求密码一次。 但是每次我们点击一​​个字段或button,都会要求input用户名和密码。 有什么办法可以解决吗?

Nginx在ElasticBeanstalk上的Docker:没有这样的文件或目录

我有一个nginx docker。 这里是Dockerfile: FROM nginx RUN rm /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/nginx.conf COPY server.8079.conf /etc/nginx/conf.d CMD nginx 当我通过docker run命令运行时,一切运行正常; /var/lib/nginx和/var/log/nginx存在正确的权限,日志文件在/var/log/nginx中创build, /var/lib/nginx/logs是一个符号链接,指向/var/log/nginx 。 但是,我不能将其部署到我的弹性beanstalk应用程序。 由于以下错误而失败: nginx: [alert] could not open error log file: open() "/var/lib/nginx/logs/error.log" failed (2: No such file or directory) 2016/10/20 17:19:26 [emerg] 5#0: open() "/var/log/nginx/error.log" failed (2: No such file or directory) 奇怪的是,当我进入Elastic Beanstalk服务器并使用docker […]

Nginx,AWS,EB,Docker,TCP Socketconfiguration400个不好的请求

我试图让端口80上的纯TCP套接字连接到端口80上的AWS上的Docker容器。到目前为止,我有: 设置正确的安全组,让端口80通过负载平衡器,它被设置为tcp连接,而不是http。 能够看到由EB创build的e2c实例上的nginx日志。 报告如下: 172.31.22.8 – – [12 / Jan / 2017:20:44:43 +0000]“…数据…”400 173“ – ”“ – 然后程序创build套接字报告: HTTP/1.1 400 Bad Request Server: nginx/1.10.1 Date: Thu, 12 Jan 2017 21:05:54 GMT Content-Type: text/html Content-Length: 173 Connection: close <html> <head><title>400 Bad Request</title></head> <body bgcolor="white"> <center><h1>400 Bad Request</h1></center> <hr><center>nginx/1.10.1</center> </body> </html> 我已经尝试了许多不同的nginxconfiguration。但是在默认情况下 ,在我开始之前configuration如下: /etc/nginx/nginx.conf # Elastic Beanstalk […]

Python中的AWS Elastic Beanstalk container_commands 3.4 Docker容器

我有一个运行在Python 3.4上的Django 1.6应用程序,我想在AWS Elastic Beanstalk上部署,因此我select了“Preconfigured-Docker / Python”(即Python 3.4)作为我的configuration,但部署失败,在container_command运行django-admin.py 。 相同的占位符应用程序包按预期在“预configuration/ Python”configuration(即Python 2.7)上运行,没有错误。 根据文档 .ebextension config container_commands在应用程序和Web服务器已经build立并且应用程序版本文件已被提取之后,但在部署应用程序之前运行。 这似乎是Python 2.7容器的情况,而不是Python 3.4的Docker容器。 为了testing理论,我在我的包中添加了一个脚本来查看环境,并将其作为container_command执行。 Python 2.7容器使用Python 2.7,从requirements.txt安装pip包, django-admin.py预期finddjango-admin.py 。 但Python 3.4 Docker容器在container_command阶段使用Python 2.6,因此没有设置环境来查找django-admin.py或安装的pip包。 如何获得预configuration的Docker / Python(3.4) container_commands在预期的环境中执行container_commands ? 在触发container_commands之前是否缺less激活容器和/或virtualenv的步骤?

通过awsebcli在Elastic Beanstalk(多容器Docker)中使用自定义的AMI

我试图find使用awsebcli命令行工具使用自定义多容器awsebcli AMI的awsebcli 。 通过他们的文档查看,我发现的最相关的选项是 – –platform参数: -p platform (for example, php, PHP, php5.5, "PHP 5.5", node.js, "64bit Amazon Linux 2014.03 v1.0.7 running PHP 5.5") 有没有办法让我在这里指定一个AMI ID,还是有另一个configuration选项,我应该使用? [编辑] 此外,这是我可以在.elasticbeanstalk/config.yml文件中指定的东西吗? global: application_name: bar default_ec2_keyname: foo default_platform: Multi-container Docker 1.9.1 (Generic) default_region: us-east-1 instance: r3.large profile: null sc: git 谢谢