質問編集履歴

2

追記

2020/04/12 09:36

投稿

ts21
ts21

スコア32

test CHANGED
File without changes
test CHANGED
@@ -44,6 +44,186 @@
44
44
 
45
45
  ```
46
46
 
47
+ 追記(04/12/18:37)
48
+
49
+ database.yamlは以下のようになります
50
+
51
+ ```
52
+
53
+ # PostgreSQL. Versions 9.3 and up are supported.
54
+
55
+ #
56
+
57
+ # Install the pg driver:
58
+
59
+ # gem install pg
60
+
61
+ # On macOS with Homebrew:
62
+
63
+ # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
64
+
65
+ # On macOS with MacPorts:
66
+
67
+ # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
68
+
69
+ # On Windows:
70
+
71
+ # gem install pg
72
+
73
+ # Choose the win32 build.
74
+
75
+ # Install PostgreSQL and put its /bin directory on your path.
76
+
77
+ #
78
+
79
+ # Configure Using Gemfile
80
+
81
+ # gem 'pg'
82
+
83
+ #
84
+
85
+ default: &default
86
+
87
+ adapter: postgresql
88
+
89
+ encoding: unicode
90
+
91
+ # For details on connection pooling, see Rails configuration guide
92
+
93
+ # https://guides.rubyonrails.org/configuring.html#database-pooling
94
+
95
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
96
+
97
+
98
+
99
+ development:
100
+
101
+ <<: *default
102
+
103
+ database: bokin_back_development
104
+
105
+
106
+
107
+ # The specified database role being used to connect to postgres.
108
+
109
+ # To create additional roles in postgres see `$ createuser --help`.
110
+
111
+ # When left blank, postgres will use the default role. This is
112
+
113
+ # the same name as the operating system user that initialized the database.
114
+
115
+ #username: bokin_back
116
+
117
+
118
+
119
+ # The password associated with the postgres role (username).
120
+
121
+ #password:
122
+
123
+
124
+
125
+ # Connect on a TCP socket. Omitted by default since the client uses a
126
+
127
+ # domain socket that doesn't need configuration. Windows does not have
128
+
129
+ # domain sockets, so uncomment these lines.
130
+
131
+ #host: localhost
132
+
133
+
134
+
135
+ # The TCP port the server listens on. Defaults to 5432.
136
+
137
+ # If your server runs on a different port number, change accordingly.
138
+
139
+ #port: 5432
140
+
141
+
142
+
143
+ # Schema search path. The server defaults to $user,public
144
+
145
+ #schema_search_path: myapp,sharedapp,public
146
+
147
+
148
+
149
+ # Minimum log levels, in increasing order:
150
+
151
+ # debug5, debug4, debug3, debug2, debug1,
152
+
153
+ # log, notice, warning, error, fatal, and panic
154
+
155
+ # Defaults to warning.
156
+
157
+ #min_messages: notice
158
+
159
+
160
+
161
+ # Warning: The database defined as "test" will be erased and
162
+
163
+ # re-generated from your development database when you run "rake".
164
+
165
+ # Do not set this db to the same as development or production.
166
+
167
+ test:
168
+
169
+ <<: *default
170
+
171
+ database: bokin_back_test
172
+
173
+
174
+
175
+ # As with config/credentials.yml, you never want to store sensitive information,
176
+
177
+ # like your database password, in your source code. If your source code is
178
+
179
+ # ever seen by anyone, they now have access to your database.
180
+
181
+ #
182
+
183
+ # Instead, provide the password as a unix environment variable when you boot
184
+
185
+ # the app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
186
+
187
+ # for a full rundown on how to provide these environment variables in a
188
+
189
+ # production deployment.
190
+
191
+ #
192
+
193
+ # On Heroku and other platform providers, you may have a full connection URL
194
+
195
+ # available as an environment variable. For example:
196
+
197
+ #
198
+
199
+ # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
200
+
201
+ #
202
+
203
+ # You can use this database configuration with:
204
+
205
+ #
206
+
207
+ # production:
208
+
209
+ # url: <%= ENV['DATABASE_URL'] %>
210
+
211
+ #
212
+
213
+ production:
214
+
215
+ <<: *default
216
+
217
+ database: bokin_back_production
218
+
219
+ username: bokin_back
220
+
221
+ password: <%= ENV['BOKIN_BACK_DATABASE_PASSWORD'] %>
222
+
223
+
224
+
225
+ ```
226
+
47
227
  zshの環境変数にはPOSGRES_USERとPOSGRES_PASSWORDを記述しました.
48
228
 
49
229
 

1

環境

2020/04/12 09:36

投稿

ts21
ts21

スコア32

test CHANGED
File without changes
test CHANGED
@@ -1,3 +1,9 @@
1
+ #環境
2
+
3
+ Mac os Catalina -v10.15.4
4
+
5
+ Ruby Mine
6
+
1
7
  #やりたいこと
2
8
 
3
9
  RailsのAPIをDockerでpostgresを動かしながら作成しようとしています