]> git.openstreetmap.org Git - rails.git/blob - config/devcontainer.database.yml
$ ./bin/rails devcontainer # DB config written as config/devcontainer.database.yml
[rails.git] / config / devcontainer.database.yml
1 # PostgreSQL. Versions 9.3 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=/usr/local/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   pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
21   <% if ENV["DB_HOST"] %>
22   host: <%= ENV["DB_HOST"] %>
23   username: postgres
24   password: postgres
25   <% end %>
26
27
28 development:
29   <<: *default
30   database: open_street_map_development
31
32   # The specified database role being used to connect to PostgreSQL.
33   # To create additional roles in PostgreSQL see `$ createuser --help`.
34   # When left blank, PostgreSQL will use the default role. This is
35   # the same name as the operating system user running Rails.
36   #username: open_street_map
37
38   # The password associated with the PostgreSQL role (username).
39   #password:
40
41   # Connect on a TCP socket. Omitted by default since the client uses a
42   # domain socket that doesn't need configuration. Windows does not have
43   # domain sockets, so uncomment these lines.
44   #host: localhost
45
46   # The TCP port the server listens on. Defaults to 5432.
47   # If your server runs on a different port number, change accordingly.
48   #port: 5432
49
50   # Schema search path. The server defaults to $user,public
51   #schema_search_path: myapp,sharedapp,public
52
53   # Minimum log levels, in increasing order:
54   #   debug5, debug4, debug3, debug2, debug1,
55   #   log, notice, warning, error, fatal, and panic
56   # Defaults to warning.
57   #min_messages: notice
58
59 # Warning: The database defined as "test" will be erased and
60 # re-generated from your development database when you run "rake".
61 # Do not set this db to the same as development or production.
62 test:
63   <<: *default
64   database: open_street_map_test
65
66 # As with config/credentials.yml, you never want to store sensitive information,
67 # like your database password, in your source code. If your source code is
68 # ever seen by anyone, they now have access to your database.
69 #
70 # Instead, provide the password or a full connection URL as an environment
71 # variable when you boot the app. For example:
72 #
73 #   DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
74 #
75 # If the connection URL is provided in the special DATABASE_URL environment
76 # variable, Rails will automatically merge its configuration values on top of
77 # the values provided in this file. Alternatively, you can specify a connection
78 # URL environment variable explicitly:
79 #
80 #   production:
81 #     url: <%= ENV["MY_APP_DATABASE_URL"] %>
82 #
83 # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
84 # for a full overview on how database connection configuration can be specified.
85 #
86 production:
87   primary: &primary_production
88     <<: *default
89     database: open_street_map_production
90     username: open_street_map
91     password: <%= ENV["OPEN_STREET_MAP_DATABASE_PASSWORD"] %>
92   cache:
93     <<: *primary_production
94     database: open_street_map_production_cache
95     migrations_paths: db/cache_migrate
96   queue:
97     <<: *primary_production
98     database: open_street_map_production_queue
99     migrations_paths: db/queue_migrate
100   cable:
101     <<: *primary_production
102     database: open_street_map_production_cable
103     migrations_paths: db/cable_migrate