easy_deploy_configs

This commit is contained in:
Zachary Chai 2016-11-15 11:35:49 -05:00
parent 8fc8182672
commit 8e7eef4b57
7 changed files with 21 additions and 18 deletions

View File

@ -6,6 +6,7 @@ README.md
# Rails
.env
.env.prod
sample.env
*.rbc
capybara-*.html
.rspec
@ -17,4 +18,10 @@ public/system
coverage/
spec/tmp
.rvmrc
scripts/
.byebug_history
# docker
docker-compose.yml
production-compose.yml
.atom

4
.gitignore vendored
View File

@ -8,8 +8,8 @@
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
/db/**/*.sqlite3
/db/**/*.sqlite3-journal
# Ignore all logfiles and tempfiles.
/log/*

View File

@ -5,5 +5,4 @@ test:
adapter: async
production:
adapter: redis
url: redis://localhost:6379/1
adapter: async

View File

@ -22,4 +22,4 @@ test:
production:
<<: *default
database: db/production.sqlite3
database: db/production/production.sqlite3

View File

@ -33,11 +33,8 @@ Rails.application.configure do
config.active_job.queue_adapter = :async
# action cable socket URI
config.action_cable.url = "ws://localhost/cable"
# allowed action cable origins
config.action_cable.allowed_request_origins = ['http://localhost']
Rails.application.config.action_cable.disable_request_forgery_protection = true
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log

View File

@ -16,7 +16,7 @@ Rails.application.configure do
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
config.public_file_server.enabled = ENV['DISABLE_RAILS_SERVE_STATIC_FILES'].blank?
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
@ -63,11 +63,11 @@ Rails.application.configure do
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# action cable socket URI
config.action_cable.url = "ws://#{ENV['HOSTNAME']}/cable" # TODO this should use WSS protocol
# allowed action cable origins
config.action_cable.allowed_request_origins = ["https://#{ENV['HOSTNAME']}", "http://#{ENV['HOSTNAME']}"]
# action cable origins
unless ENV["RAILS_ACTION_CABLE_FORGERY_PROTECTION"].present?
Rails.application.config.action_cable.disable_request_forgery_protection = true
end
# config.action_cable.allowed_request_origins = ["https://#{ENV['HOSTNAME']}", "http://#{ENV['HOSTNAME']}"]
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
@ -79,7 +79,7 @@ Rails.application.configure do
# require 'syslog/logger'
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if ENV["RAILS_LOG_TO_STDOUT"].present?
if ENV["DISABLE_RAILS_LOG_TO_STDOUT"].blank?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)

View File

@ -9,7 +9,7 @@ threads threads_count, threads_count
# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
#
port ENV.fetch("PORT") { 9292 }
port ENV.fetch("PORT") { 80 }
# Specifies the `environment` that Puma will run in.
#