rails setup

This commit is contained in:
2016-08-27 16:32:04 -05:00
parent ceb14fc74b
commit 8ff9ca02f8
15 changed files with 519 additions and 66 deletions

View File

@ -11,5 +11,13 @@ module FtpManager
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.action_mailer.default_url_options = { host: ENV['full_app_url'] }
config.generators do |g|
g.assets false
g.helper false
g.routes false
end
end
end

View File

@ -0,0 +1,20 @@
# Add configuration values here, as shown below.
defaults: &defaults
mysql_host: "localhost"
mysql_usr: "user"
mysql_pwd: "password"
full_app_url: "localhost:3000"
development:
<<: *defaults
test:
<<: *defaults
production:
<<: *defaults
mysql_usr: "user"
mysql_pwd: "password!"
secret_key_base: "super-long-secret-key-base"
full_app_url: "production.domain.com/sub-folder/"

View File

@ -13,8 +13,9 @@ default: &default
adapter: mysql2
encoding: utf8
pool: 5
username: root
password:
host: <%= ENV['mysql_host'] %>
username: <%= ENV['mysql_usr'] %>
password: <%= ENV['mysql_pwd'] %>
socket: /var/run/mysqld/mysqld.sock
development:

View File

@ -47,7 +47,7 @@ Rails.application.configure do
config.log_level = :debug
# Prepend all log lines with the following tags.
config.log_tags = [ :request_id ]
config.log_tags = [:request_id]
# Use a different cache store in production.
# config.cache_store = :mem_cache_store

View File

@ -19,4 +19,4 @@ test:
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
secret_key_base: <%= ENV["secret_key_base"] %>