|
1 | | -# MySQL. Versions 5.1.10 and up are supported. |
| 1 | +# PostgreSQL. Versions 9.1 and up are supported. |
2 | 2 | # |
3 | | -# Install the MySQL driver |
4 | | -# gem install mysql2 |
| 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. |
5 | 13 | # |
6 | | -# Ensure the MySQL gem is defined in your Gemfile |
7 | | -# gem 'mysql2' |
| 14 | +# Configure Using Gemfile |
| 15 | +# gem 'pg' |
8 | 16 | # |
9 | | -# And be sure to use new-style password hashing: |
10 | | -# https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html |
11 | | -# |
12 | | - |
13 | 17 | default: &default |
14 | 18 | adapter: postgis |
15 | 19 | encoding: unicode |
16 | | - # host: localhost |
17 | | - host: db |
18 | | - username: <%= ENV['POSTGRES_USER'] %> |
19 | | - password: <%= ENV['POSTGRES_PASSWORD'] %> |
20 | 20 | # For details on connection pooling, see Rails configuration guide |
21 | 21 | # http://guides.rubyonrails.org/configuring.html#database-pooling |
22 | 22 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> |
| 23 | + url: <%= ENV.fetch("DATABASE_URL") { 'postgres://postgres:postgres@community-engine-db' } %> |
23 | 24 |
|
24 | 25 | development: |
25 | 26 | <<: *default |
26 | | - database: community-engine_dummy_development |
| 27 | + database: community_engine_development |
| 28 | + |
| 29 | + # The specified database role being used to connect to postgres. |
| 30 | + # To create additional roles in postgres see `$ createuser --help`. |
| 31 | + # When left blank, postgres will use the default role. This is |
| 32 | + # the same name as the operating system user that initialized the database. |
| 33 | + #username: community_engine |
| 34 | + |
| 35 | + # The password associated with the postgres role (username). |
| 36 | + #password: |
| 37 | + |
| 38 | + # Connect on a TCP socket. Omitted by default since the client uses a |
| 39 | + # domain socket that doesn't need configuration. Windows does not have |
| 40 | + # domain sockets, so uncomment these lines. |
| 41 | + #host: localhost |
| 42 | + |
| 43 | + # The TCP port the server listens on. Defaults to 5432. |
| 44 | + # If your server runs on a different port number, change accordingly. |
| 45 | + #port: 5432 |
| 46 | + |
| 47 | + # Schema search path. The server defaults to $user,public |
| 48 | + #schema_search_path: myapp,sharedapp,public |
| 49 | + |
| 50 | + # Minimum log levels, in increasing order: |
| 51 | + # debug5, debug4, debug3, debug2, debug1, |
| 52 | + # log, notice, warning, error, fatal, and panic |
| 53 | + # Defaults to warning. |
| 54 | + #min_messages: notice |
27 | 55 |
|
28 | 56 | # Warning: The database defined as "test" will be erased and |
29 | 57 | # re-generated from your development database when you run "rake". |
30 | 58 | # Do not set this db to the same as development or production. |
31 | 59 | test: |
32 | 60 | <<: *default |
33 | | - database: community-engine_dummy_test |
| 61 | + database: community_engine_test |
34 | 62 |
|
35 | 63 | # As with config/secrets.yml, you never want to store sensitive information, |
36 | 64 | # like your database password, in your source code. If your source code is |
|
44 | 72 | # On Heroku and other platform providers, you may have a full connection URL |
45 | 73 | # available as an environment variable. For example: |
46 | 74 | # |
47 | | -# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase" |
| 75 | +# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" |
48 | 76 | # |
49 | 77 | # You can use this database configuration with: |
50 | 78 | # |
|
53 | 81 | # |
54 | 82 | production: |
55 | 83 | <<: *default |
56 | | - database: community-engine_dummy_production |
57 | | - username: dummy |
58 | | - password: <%= ENV['BETTER_TOGETHER_DATABASE_PASSWORD'] %> |
| 84 | + url: <%= ENV['DATABASE_URL'] %> |
0 commit comments