我认为这是一个很容易解决的问题,但我似乎无法解决它!我花了很多时间在Google/SO上寻找任何潜在客户,但找不到解决方案.
执行时eb local run,我收到此错误:
注册表配置无效
$ eb local run
ERROR: InvalidConfigFile :: Invalid configuration for registry 12345678.dkr.ecr.eu-west-1.amazonaws.com
Run Code Online (Sandbox Code Playgroud)
我的图像行Dockerrun.aws.json如下:
{
"AWSEBDockerrunVersion": 2,
"volumes": [
{
"name": "frontend",
"host": {
"sourcePath": "/var/app/current/frontend"
}
},
{
"name": "backend",
"host": {
"sourcePath": "/var/app/current/backend"
}
},
{
"name": "nginx-proxy-conf",
"host": {
"sourcePath": "/var/app/current/config/nginx"
}
},
{
"name": "nginx-proxy-content",
"host": {
"sourcePath": "/var/app/current/content/"
}
},
{
"name": "nginx-proxy-ssl",
"host": {
"sourcePath": "/var/app/current/config/ssl"
}
}
],
"containerDefinitions": [
{
"name": "backend",
"image": "123456.dkr.ecr.eu-west-1.amazonaws.com/backend:latest", …Run Code Online (Sandbox Code Playgroud) amazon-web-services docker aws-cli amazon-elastic-beanstalk eb
我是AWS Beanstalk-Rails-Puma-Nginx的新手.将我的RAILS应用程序部署到Beanstalk后,我的所有api调用都可以正常工作,但HTML页面会导致错误.
打开我的HTML页面时 -
502 Bad Gateway错误.Started GET "/admin" for 182.70.76.160 at 2016-04-22 05:13:19 +0000
Processing by Devise::SessionsController#new as HTML
Rendered devise/sessions/new.html.erb within layouts/application (6.1ms)
[18858] ! Terminating timed out worker: 22913var/app/current/production.log 是空的.在某处读取,添加SSL可以解决.是否需要添加SSL?
请帮忙!我卡住了!
状态:我的资产很庞大,因为它自杀了.我正在使用一个主题并删除了所有不必要的js,css和图像.
现在,Puma不会终止,但它不会编译资产.我选择Ruby作为应用程序类型,所以它应该为我做,对吗?
我开始使用ElasticBeanstalk AWS CLI,我已经改变了一些工作流程.以前我从我的git存储库上面的目录(它是一个私有GitLab目录的克隆)部署,并转移了一些东西.
之前它的结构如下:
-- some_dir
|-- .ebextensions
| |- some_files
|
|-- my_git_directory
|- .git
|- some_files
Run Code Online (Sandbox Code Playgroud)
当我跑eb deploy:
[some_dir] $ eb deploy
... Everything is awesome.
Run Code Online (Sandbox Code Playgroud)
但是现在,我已经开始尝试从git目录进行部署,但事情并没有奏效:
-- some_dir
|-- my_git_directory
|-- .ebextensions
| |- some_files
|- .git
|- some_files
[some_dir/my_git_directory] $ eb deploy
... Everything sucks.
ERROR: An error occurred while handling git command.
Error code: 128 Error: fatal: Not a git repository (or any of the parent directories): .git
Run Code Online (Sandbox Code Playgroud)
我有一个场景,我需要动态创建一个表,为了动态创建表,我编写了代码来创建一个带有我要创建的表内容的model.py文件.
一旦创建了这个文件,我就想从代码本身执行makemigrations命令
from django.core.management import call_command
call_command('makemigrations')
call_command('migrate')
Run Code Online (Sandbox Code Playgroud)
它在我的本地以及AWS EC2实例中运行良好,但它不适用于Elastic Beanstalk(eb).当我试图从eb ssh手动运行makemigrations命令时,它会给我以下错误.
PermissionError: [Errno 13] Permission denied: '/opt/python/bundle/47/app/quotations/migrations/0036_dynamic_table.py'
Run Code Online (Sandbox Code Playgroud)
任何人都知道如何处理这种情况.
另一件事是,当我正在创建新的动态模型时,我如何将该代码推送到git,因为在新的部署EBS将现有代码替换为新代码,因此这样我将丢失我创建的文件在EBS中使用这些命令
谢谢
python django amazon-web-services amazon-elastic-beanstalk eb