- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用以下堆栈构建了一个 rails 应用程序:
=== puma startup: 2017-01-17 18:10:06 +0000 ===
=== puma startup: 2017-01-17 18:10:06 +0000 ===
[1501] - Worker 0 (pid: 1504) booted, phase: 0
2017/01/17 18:03:08 [warn] 703#0: conflicting server name "localhost" on 0.0.0.0:80, ignored
2017/01/17 18:25:00 [warn] 2043#0: conflicting server name "localhost" on 0.0.0.0:80, ignored
2017/01/17 18:25:00 [warn] 2050#0: conflicting server name "localhost" on 0.0.0.0:80, ignored
D, [2017-01-17T18:10:02.564332 #1397] DEBUG -- : (1.0ms) SELECT pg_try_advisory_lock(6778635641374256100);
D, [2017-01-17T18:10:02.574041 #1397] DEBUG -- : ActiveRecord::SchemaMigration Load (1.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
D, [2017-01-17T18:10:02.591019 #1397] DEBUG -- : ActiveRecord::InternalMetadata Load (1.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", :environment], ["LIMIT", 1]]
D, [2017-01-17T18:10:02.596200 #1397] DEBUG -- : (1.0ms) BEGIN
D, [2017-01-17T18:10:02.598152 #1397] DEBUG -- : (1.0ms) COMMIT
D, [2017-01-17T18:10:02.599249 #1397] DEBUG -- : (0.9ms) SELECT pg_advisory_unlock(6778635641374256100)
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/
# deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end
source 'https://rubygems.org'
# Ruby gem
ruby '2.3.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
# Gemfile for password hashing
gem 'bcrypt', '3.1.11'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.18'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'jquery-ui-rails', '~> 5.0', '>= 5.0.5'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'select2-rails'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Upload files
gem 'carrierwave', '>= 1.0.0.rc', '< 2.0'
# Image resizing
gem 'mini_magick', '~> 4.5', '>= 4.5.1'
# Image upload in production
gem 'fog-aws'
# Autoprefix CSS
gem "autoprefixer-rails"
# Google Maps API
gem 'geocoder'
# Redis
gem 'redis', '~> 3.3', '>= 3.3.1'
# For postgres full text search
gem 'pg_search'
# Font awesome support
gem "font-awesome-rails"
# Google oauth-2
gem "omniauth-google-oauth2"
# Facebook omniauth
gem 'omniauth-facebook'
group :production do
gem 'remote_syslog_logger'
end
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
gem 'better_errors', '~> 2.1', '>= 2.1.1'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'rails_layout'
gem 'seed_dump', '~> 3.2', '>= 3.2.4'
gem 'rubocop', '~> 0.44.1', require: false
gem 'binding_of_caller', '~> 0.7.2'
gem 'meta_request'
gem 'rack-mini-profiler', '~> 0.10.1'
gem 'brakeman', :require => false
gem 'bullet'
end
group :test do
gem 'rails-controller-testing', '0.1.1'
gem 'minitest-reporters', '1.1.9'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
bind "unix:///var/run/puma/my_app.sock"
pidfile "/var/run/puma/my_app.sock"
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.fedora.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
index index.html index.htm;
server {
listen 80 ;
listen [::]:80 ;
server_name localhost;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
}
# redirect server error pages to the static page /40x.html
#
error_page 404 /404.html;
location = /40x.html {
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# Settings for a TLS enabled server.
#
# server {
# listen 443 ssl;
# listen [::]:443 ssl;
# server_name localhost;
# root /usr/share/nginx/html;
#
# ssl_certificate "/etc/pki/nginx/server.crt";
# ssl_certificate_key "/etc/pki/nginx/private/server.key";
# # It is *strongly* recommended to generate unique DH parameters
# # Generate them with: openssl dhparam -out /etc/pki/nginx/dhparams.pem 2048
# #ssl_dhparam "/etc/pki/nginx/dhparams.pem";
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 10m;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_ciphers HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP;
# ssl_prefer_server_ciphers on;
#
# # Load configuration files for the default server block.
# include /etc/nginx/default.d/*.conf;
#
# location / {
# }
#
# error_page 404 /404.html;
# location = /40x.html {
# }
#
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# }
}
config.force_ssl = true
最佳答案
将 Rails 应用程序部署到弹性 beantalk 后,我收到 504 网关超时错误。在应用程序的根目录中添加一个名为“Procfile”(无扩展名)的文件,内容为
web: bundle exec puma -C /opt/elasticbeanstalk/config/private/pumaconf.rb
解决了我的问题。
关于ruby-on-rails - 使用弹性 beanstalk 部署的 Rails 应用程序响应 "site can' t bereach",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41704667/
我正在尝试将我的应用程序上载到Elastic Beanstalk,但是在节点预gyp安装--fallback-to-build上,npm安装失败。我尝试了各种版本的节点,但无济于事。似乎正在尝试获取一
设置 Elastic Beanstalk 的配置时,我没有获得解决方案堆栈的任何选项。 以下是有问题的行: `Select a solution stack. Available solution s
我正在尝试自定义 beanstalk 的默认 AMI,但每次我都会在一段随机时间后服务器重新启动。我什至没有改变任何东西,但没有任何效果。 我尝试过以下方法: 找到运行beanstalk的实例,创建A
我正在尝试使用sudo pip install awsebcli在新的Ubuntu 14.04(在Windows的Linux子系统上)上安装Elastic Beanstalk CLI(awsebcli
Amazon Beanstalk 是否会自动防止(分布式)拒绝服务攻击?如果没有,最方便的方法是什么? 最佳答案 我相信它会 New – AWS Shield AWS Shield is a new
每当我在 Elastic Beanstalk 中创建新环境时,我都会手动配置自定义 AMI ID、SNS 通知等,但我想自动完成,即,将设置(自定义 AMI ID、SNS、 key 对等)保存到一个配
我已使用以下方法连接到 Elastic Beanstalk: eb ssh XXXXXX --profile=xx 现在我想将一个文件复制到我的本地机器上,我该怎么做? 最佳答案 找出与 scp 一起
对于典型的 Java Web 应用程序,使用 Elastic Beanstalk 相对于手动创建 EC2 实例、设置 tomcat 服务器和部署等有哪些优势?负载平衡、监控和自动缩放是唯一的优势吗?
我有一个运行 PHP 的弹性 beanstalk 环境。在我的项目中,我有一个 .ebextensions 文件夹和一个名为“15-memorymonitor.config”的文件,其中包含以下内容;
我有 “更新”:Dockerrun.aws.json 中的“真” 当我更新 ECR 中的图像时,它应该自动更新 EC2 iontance 中的图像和容器。 但是当我在推送新图像后通过 ssh 进入实例
我有一个定义 Elastic Beanstalk 应用程序的 CloudFormation 模板。 我想扩展这个应用程序,即我希望端口 80 上的监听器重定向到 HTTPS。 AWS::Elastic
我在使用自定义 .ebextensions 文件部署 EB 实例时遇到问题。这是该文件中的相关部分: container_commands: 01_migrate: command: 'p
我已经使用带负载均衡器的 Elastic Beanstalk 创建了一个环境,并在各自的配置中分配了所有健康检查值 我也为ELB设置了应用健康检查url 但是当我检查自动缩放组配置时,健康检查类型是
我正在尝试部署我的 角申请通过GitHub Actions到 Elastic Beanstalk 。我正在使用这个 GitHub actions用于部署到 ELB。 我的问题是,部署失败,因为 ELB
我已阅读有关 Deploying Versions with Zero Downtime 的 AWS 文档,又名 CNAME 交换。 如 yegor256在 this answer 中有解释: The
我有一个弹性 beanstalk 设置,但无法访问环境中列出的 url,而如果我指向负载均衡器的 url,我可以访问它。 有什么建议吗? 最佳答案 将 LoadBalancer 安全组附加到实例。对我
我正在使用 AWS Elastic beanstalk 并希望为不同的环境配置不同的 ENV 变量。我发现的唯一方法是使用 ebextensions,但如果我将同一个数据包部署到多个环境,则无法覆盖在
我有一个应用程序,其中包含 nodejs 和 php 代码。 nodejs 用于运行应用程序所需的几个脚本。我如何使用 aws Elastic beanstalk 部署此类应用程序? 最佳答案 有两种
我今天遇到一个关于 Amazon Elastick BeanStalk 的奇怪问题:对于我的实例,我无法上传应用程序: XXX@-Vostro-2520:~/git_projects/ProjectB
我不断收到以下消息。但是在我的 nginx 日志中没有任何内容表明返回的请求状态为 5xx。此外,应用程序似乎按预期工作。我可能会得到这些的任何指示? 留言: Environment health h
我是一名优秀的程序员,十分优秀!