| 1 | # PostgreSQL. Versions 9.5 and up are supported. |
| 2 | # |
| 3 | # Install the pg driver: |
| 4 | # gem install pg |
| 5 | # On macOS with Homebrew: |
| 6 | # gem install pg -- --with-pg-config=/opt/homebrew/bin/pg_config |
| 7 | # On Windows: |
| 8 | # gem install pg |
| 9 | # Choose the win32 build. |
| 10 | # Install PostgreSQL and put its /bin directory on your path. |
| 11 | # |
| 12 | # Configure Using Gemfile |
| 13 | # gem "pg" |
| 14 | # |
| 15 | default: &default |
| 16 | adapter: postgresql |
| 17 | encoding: unicode |
| 18 | # For details on connection pooling, see Rails configuration guide |
| 19 | # https://guides.rubyonrails.org/configuring.html#database-pooling |
| 20 | max_connections: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> |
| 21 | |
| 22 | |
| 23 | development: |
| 24 | <<: *default |
| 25 | database: sigitsi_development |
| 26 | |
| 27 | # The specified database role being used to connect to PostgreSQL. |
| 28 | # To create additional roles in PostgreSQL see `$ createuser --help`. |
| 29 | # When left blank, PostgreSQL will use the default role. This is |
| 30 | # the same name as the operating system user running Rails. |
| 31 | #username: sigitsi |
| 32 | |
| 33 | # The password associated with the PostgreSQL role (username). |
| 34 | #password: |
| 35 | |
| 36 | # Connect on a TCP socket. Omitted by default since the client uses a |
| 37 | # domain socket that doesn't need configuration. Windows does not have |
| 38 | # domain sockets, so uncomment these lines. |
| 39 | #host: localhost |
| 40 | |
| 41 | # The TCP port the server listens on. Defaults to 5432. |
| 42 | # If your server runs on a different port number, change accordingly. |
| 43 | #port: 5432 |
| 44 | |
| 45 | # Schema search path. The server defaults to $user,public |
| 46 | #schema_search_path: myapp,sharedapp,public |
| 47 | |
| 48 | # Minimum log levels, in increasing order: |
| 49 | # debug5, debug4, debug3, debug2, debug1, |
| 50 | # log, notice, warning, error, fatal, and panic |
| 51 | # Defaults to warning. |
| 52 | #min_messages: notice |
| 53 | |
| 54 | # Warning: The database defined as "test" will be erased and |
| 55 | # re-generated from your development database when you run "rake". |
| 56 | # Do not set this db to the same as development or production. |
| 57 | test: |
| 58 | <<: *default |
| 59 | database: sigitsi_test |
| 60 | |
| 61 | # As with config/credentials.yml, you never want to store sensitive information, |
| 62 | # like your database password, in your source code. If your source code is |
| 63 | # ever seen by anyone, they now have access to your database. |
| 64 | # |
| 65 | # Instead, provide the password or a full connection URL as an environment |
| 66 | # variable when you boot the app. For example: |
| 67 | # |
| 68 | # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" |
| 69 | # |
| 70 | # If the connection URL is provided in the special DATABASE_URL environment |
| 71 | # variable, Rails will automatically merge its configuration values on top of |
| 72 | # the values provided in this file. Alternatively, you can specify a connection |
| 73 | # URL environment variable explicitly: |
| 74 | # |
| 75 | # production: |
| 76 | # url: <%= ENV["MY_APP_DATABASE_URL"] %> |
| 77 | # |
| 78 | # Connection URLs for non-primary databases can also be configured using |
| 79 | # environment variables. The variable name is formed by concatenating the |
| 80 | # connection name with `_DATABASE_URL`. For example: |
| 81 | # |
| 82 | # CACHE_DATABASE_URL="postgres://cacheuser:cachepass@localhost/cachedatabase" |
| 83 | # |
| 84 | # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database |
| 85 | # for a full overview on how database connection configuration can be specified. |
| 86 | # |
| 87 | production: |
| 88 | primary: &primary_production |
| 89 | <<: *default |
| 90 | database: sigitsi_production |
| 91 | username: sigitsi |
| 92 | password: <%= ENV["SIGITSI_DATABASE_PASSWORD"] %> |
| 93 | cache: |
| 94 | <<: *primary_production |
| 95 | database: sigitsi_production_cache |
| 96 | migrations_paths: db/cache_migrate |
| 97 | queue: |
| 98 | <<: *primary_production |
| 99 | database: sigitsi_production_queue |
| 100 | migrations_paths: db/queue_migrate |
| 101 | cable: |
| 102 | <<: *primary_production |
| 103 | database: sigitsi_production_cable |
| 104 | migrations_paths: db/cable_migrate |