-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Heroku Deployment #15
Changes from 6 commits
eb370dc
1c7faad
48bb8ce
566dde7
1d0e3eb
26d38ee
55a79f4
0aa7460
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
web: bundle exec puma -C config/puma.rb -p $PORT | ||
release: bin/rails db:prepare | ||
release: bin/rails db:prepare |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,8 @@ production: | |
adapter: redis | ||
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> | ||
channel_prefix: bjc_teacher_tracker_production | ||
|
||
staging: | ||
adapter: redis | ||
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> | ||
channel_prefix: bjc_teacher_tracker_production | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This name should probably be updated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea probably. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,10 @@ production: | |
adapter: postgresql | ||
pool: 5 | ||
timeout: 5000 | ||
database: bjc_teachers_prod | ||
database: bjc_teachers_prod | ||
|
||
production: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn’t this key be staging? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I think I got prod and stage database name mixed up. |
||
adapter: postgresql | ||
pool: 5 | ||
timeout: 5000 | ||
database: bjc_teachers_stage |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# frozen_string_literal: true | ||
|
||
Rails.application.configure do | ||
# Settings specified here will take precedence over those in config/application.rb. | ||
|
||
# Code is not reloaded between requests. | ||
config.cache_classes = true | ||
|
||
# Eager load code on boot. This eager loads most of Rails and | ||
# your application in memory, allowing both threaded web servers | ||
# and those relying on copy on write to perform better. | ||
# Rake tasks automatically ignore this option for performance. | ||
config.eager_load = true | ||
|
||
# Full error reports are disabled and caching is turned on. | ||
config.consider_all_requests_local = false | ||
config.action_controller.perform_caching = true | ||
|
||
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] | ||
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files). | ||
# config.require_master_key = true | ||
|
||
# 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? | ||
|
||
# Compress JavaScripts and CSS. | ||
# config.assets.js_compressor = Uglifier.new(harmony: true) | ||
# config.assets.css_compressor = :sass | ||
|
||
# Enable serving of images, stylesheets, and JavaScripts from an asset server. | ||
# config.action_controller.asset_host = 'http://assets.example.com' | ||
|
||
# Specifies the header that your server uses for sending files. | ||
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache | ||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX | ||
|
||
# Store uploaded files on the local file system (see config/storage.yml for options) | ||
# config.active_storage.service = :local | ||
|
||
# Mount Action Cable outside main process or domain | ||
# config.action_cable.mount_path = nil | ||
# config.action_cable.url = 'wss://example.com/cable' | ||
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] | ||
|
||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. | ||
config.force_ssl = true | ||
|
||
# Use the lowest log level to ensure availability of diagnostic information | ||
# when problems arise. | ||
config.log_level = :warn | ||
|
||
# Prepend all log lines with the following tags. | ||
config.log_tags = [ :request_id ] | ||
|
||
# Don't log view information: | ||
config.action_view.logger = nil | ||
|
||
# Use a different cache store in production. | ||
# config.cache_store = :mem_cache_store | ||
|
||
# Use a real queuing backend for Active Job (and separate queues per environment) | ||
# config.active_job.queue_adapter = :resque | ||
# config.active_job.queue_name_prefix = "bjc_teacher_tracker_#{Rails.env}" | ||
|
||
config.action_mailer.perform_caching = false | ||
|
||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to | ||
# the I18n.default_locale when a translation cannot be found). | ||
config.i18n.fallbacks = true | ||
|
||
# Send deprecation notices to registered listeners. | ||
config.active_support.deprecation = :notify | ||
|
||
# Use default logging formatter so that PID and timestamp are not suppressed. | ||
config.log_formatter = ::Logger::Formatter.new | ||
|
||
# Use a different logger for distributed setups. | ||
# require 'syslog/logger' | ||
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') | ||
|
||
if ENV["RAILS_LOG_TO_STDOUT"].present? | ||
logger = ActiveSupport::Logger.new(STDOUT) | ||
logger.formatter = config.log_formatter | ||
config.logger = ActiveSupport::TaggedLogging.new(logger) | ||
end | ||
|
||
# Do not dump schema after migrations. | ||
config.active_record.dump_schema_after_migration = false | ||
|
||
# Email settings | ||
# Do not send emails in staging environment, and do not raise errors | ||
config.action_mailer.raise_delivery_errors = false | ||
|
||
# Store files on Amazon S3. (Uncomment this when S3 is setup) | ||
# config.active_storage.service = :amazon | ||
end |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -27,3 +27,8 @@ production: | |||||||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> | ||||||||||
bjc_password: <%= ENV["BJC_PASSWORD"] %> | ||||||||||
piazza_password: <%= ENV["PIAZZA_PASSWORD"] %> | ||||||||||
|
||||||||||
staging: | ||||||||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> | ||||||||||
bjc_password: <%= ENV["BJC_PASSWORD"] %> | ||||||||||
piazza_password: <%= ENV["PIAZZA_PASSWORD"] %> | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This would reduce some duplication |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also just do
rails db
, locally or on heroku.