Skip to content

Commit 96f514c

Browse files
committedOct 4, 2015
Restore the sample config files and update the readme.
1 parent 373be38 commit 96f514c

File tree

3 files changed

+113
-0
lines changed

3 files changed

+113
-0
lines changed
 

‎README.md

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ $ bundle install
1010
$ cp ./config/database.yml.sample ./config/database.yml
1111
$ cp ./config/secrets.yml.sample ./config/secrets.yml
1212

13+
To change the default secret keys, run the command below, copy the generated
14+
key and modify the secrets.yml file. You'll need to do this twice. Once for
15+
the test key and once for the developement key.
16+
17+
$ rake secret
18+
1319
_If you *do not* want to use the project default database names, then you'll want to edit
1420
config/database.yml before runnig the last command._
1521

‎config/database.yml.sample

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# PostgreSQL. Versions 8.2 and up are supported.
2+
#
3+
# Install the pg driver:
4+
# gem install pg
5+
# On OS X with Homebrew:
6+
# gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7+
# On OS X with MacPorts:
8+
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9+
# On Windows:
10+
# gem install pg
11+
# Choose the win32 build.
12+
# Install PostgreSQL and put its /bin directory on your path.
13+
#
14+
# Configure Using Gemfile
15+
# gem 'pg'
16+
#
17+
default: &default
18+
adapter: postgresql
19+
encoding: unicode
20+
# For details on connection pooling, see rails configuration guide
21+
# http://guides.rubyonrails.org/configuring.html#database-pooling
22+
pool: 5
23+
24+
development:
25+
<<: *default
26+
database: committed_development
27+
28+
# The specified database role being used to connect to postgres.
29+
# To create additional roles in postgres see `$ createuser --help`.
30+
# When left blank, postgres will use the default role. This is
31+
# the same name as the operating system user that initialized the database.
32+
#username: committed
33+
34+
# The password associated with the postgres role (username).
35+
#password:
36+
37+
# Connect on a TCP socket. Omitted by default since the client uses a
38+
# domain socket that doesn't need configuration. Windows does not have
39+
# domain sockets, so uncomment these lines.
40+
#host: localhost
41+
42+
# The TCP port the server listens on. Defaults to 5432.
43+
# If your server runs on a different port number, change accordingly.
44+
#port: 5432
45+
46+
# Schema search path. The server defaults to $user,public
47+
#schema_search_path: myapp,sharedapp,public
48+
49+
# Minimum log levels, in increasing order:
50+
# debug5, debug4, debug3, debug2, debug1,
51+
# log, notice, warning, error, fatal, and panic
52+
# Defaults to warning.
53+
#min_messages: notice
54+
55+
# Warning: The database defined as "test" will be erased and
56+
# re-generated from your development database when you run "rake".
57+
# Do not set this db to the same as development or production.
58+
test:
59+
<<: *default
60+
database: committed_test
61+
62+
# As with config/secrets.yml, you never want to store sensitive information,
63+
# like your database password, in your source code. If your source code is
64+
# ever seen by anyone, they now have access to your database.
65+
#
66+
# Instead, provide the password as a unix environment variable when you boot
67+
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
68+
# for a full rundown on how to provide these environment variables in a
69+
# production deployment.
70+
#
71+
# On Heroku and other platform providers, you may have a full connection URL
72+
# available as an environment variable. For example:
73+
#
74+
# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
75+
#
76+
# You can use this database configuration with:
77+
#
78+
# production:
79+
# url: <%= ENV['DATABASE_URL'] %>
80+
#
81+
production:
82+
<<: *default
83+
database: committed_production
84+
username: committed
85+
password: <%= ENV['COMMITTED_DATABASE_PASSWORD'] %>

‎config/secrets.yml.sample

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Be sure to restart your server when you modify this file.
2+
3+
# Your secret key is used for verifying the integrity of signed cookies.
4+
# If you change this key, all old signed cookies will become invalid!
5+
6+
# Make sure the secret is at least 30 characters and all random,
7+
# no regular words or you'll be exposed to dictionary attacks.
8+
# You can use `rake secret` to generate a secure secret key.
9+
10+
# Make sure the secrets in this file are kept private
11+
# if you're sharing your code publicly.
12+
13+
development:
14+
secret_key_base: 16842fa75ba34a0cf36b3d022f2fbb38c7f098115cbb5cf2e098b8a72b31a7124a07a0a14127c8af6570d9a76618f5268614b5979255dbd7b6bef2205a95b0b1
15+
16+
test:
17+
secret_key_base: 4c1d4d52b4ff40ed9c764e87407ff5f05ce82becbb33ac0aa963c526122ae3031ef940825b206525b807407b4c4fc6de3221396332f565e950a1946f9802ca82
18+
19+
# Do not keep production secrets in the repository,
20+
# instead read values from the environment.
21+
production:
22+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

0 commit comments

Comments
 (0)
Please sign in to comment.