Skip to content

Commit

Permalink
improve instructions for production.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
pushcx committed Aug 7, 2019
1 parent d7a14e8 commit cb2bbe8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 29 deletions.
19 changes: 3 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,10 @@ running tests:
```sh
lobsters$ rails db:schema:load
```
* Define your site's name and default domain, which are used in various places,
in a `config/initializers/production.rb` or similar file:
```ruby
class << Rails.application
def domain
"example.com"
end
def name
"Example News"
end
end
Rails.application.routes.default_url_options[:host] = Rails.application.domain
```
* On your production server, copy `config/initializers/production.rb.sample`
to `config/initalizers.production.rb` and customize it with your site's
`domain` and `name`. (You don't need this on your dev machine).
* Put your site's custom CSS in `app/assets/stylesheets/local`.
Expand Down
26 changes: 13 additions & 13 deletions config/initializers/production.rb.sample
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,22 @@ if Rails.env.production?
Keybase.BASE_URL = ENV.fetch('KEYBASE_BASE_URL') { 'https://keybase.io' }

ActionMailer::Base.delivery_method = :sendmail
end

class << Rails.application
def allow_invitation_requests?
false
end
class << Rails.application
def allow_invitation_requests?
false
end

def domain
"example.org"
end
def domain
"example.org"
end

def name
"Sitename"
end
def name
"Sitename"
end

def ssl?
true
def ssl?
true
end
end
end

0 comments on commit cb2bbe8

Please sign in to comment.