質問編集履歴
2
ホスト設定変更の可能性について/private/etc/hostsを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -205,3 +205,41 @@
|
|
205
205
|
database: webapp_test
|
206
206
|
|
207
207
|
```
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
追記
|
212
|
+
|
213
|
+
/private/etc/hosts
|
214
|
+
|
215
|
+
```
|
216
|
+
|
217
|
+
##
|
218
|
+
|
219
|
+
# Host Database
|
220
|
+
|
221
|
+
#
|
222
|
+
|
223
|
+
# localhost is used to configure the loopback interface
|
224
|
+
|
225
|
+
# when the system is booting. Do not change this entry.
|
226
|
+
|
227
|
+
##
|
228
|
+
|
229
|
+
127.0.0.1 localhost
|
230
|
+
|
231
|
+
255.255.255.255 broadcasthost
|
232
|
+
|
233
|
+
::1 localhost
|
234
|
+
|
235
|
+
# Added by Docker Desktop
|
236
|
+
|
237
|
+
# To allow the same kube context to work on the host and the container:
|
238
|
+
|
239
|
+
127.0.0.1 kubernetes.docker.internal
|
240
|
+
|
241
|
+
# End of section
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
```
|
1
追記依頼ファイルの記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -27,3 +27,181 @@
|
|
27
27
|
|
28
28
|
|
29
29
|
宜しくお願い致します。
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
追記
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
docker-compose.yml
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
version: '3'
|
42
|
+
|
43
|
+
services:
|
44
|
+
|
45
|
+
app:
|
46
|
+
|
47
|
+
build:
|
48
|
+
|
49
|
+
context: .
|
50
|
+
|
51
|
+
env_file:
|
52
|
+
|
53
|
+
- ./environments/db.env
|
54
|
+
|
55
|
+
command: bundle exec puma -C config/puma.rb
|
56
|
+
|
57
|
+
ports:
|
58
|
+
|
59
|
+
- 3000:3000
|
60
|
+
|
61
|
+
volumes:
|
62
|
+
|
63
|
+
- .:/webapp
|
64
|
+
|
65
|
+
- tmp-data:/webapp/tmp
|
66
|
+
|
67
|
+
- log-data:/webapp/log
|
68
|
+
|
69
|
+
depends_on:
|
70
|
+
|
71
|
+
- db
|
72
|
+
|
73
|
+
environment:
|
74
|
+
|
75
|
+
- "SELENIUM_DRIVER_URL=http://selenium_chrome:4444/wd/hub"
|
76
|
+
|
77
|
+
db:
|
78
|
+
|
79
|
+
image: mysql:5.7
|
80
|
+
|
81
|
+
env_file:
|
82
|
+
|
83
|
+
- ./environments/db.env
|
84
|
+
|
85
|
+
volumes:
|
86
|
+
|
87
|
+
- db-data:/var/lib/mysql
|
88
|
+
|
89
|
+
web:
|
90
|
+
|
91
|
+
build:
|
92
|
+
|
93
|
+
context: containers/nginx
|
94
|
+
|
95
|
+
volumes:
|
96
|
+
|
97
|
+
- ./public:/webapp/public
|
98
|
+
|
99
|
+
- tmp-data:/webapp/tmp
|
100
|
+
|
101
|
+
ports:
|
102
|
+
|
103
|
+
- 80:80
|
104
|
+
|
105
|
+
depends_on:
|
106
|
+
|
107
|
+
- app
|
108
|
+
|
109
|
+
selenium_chrome:
|
110
|
+
|
111
|
+
image: selenium/standalone-chrome-debug
|
112
|
+
|
113
|
+
logging:
|
114
|
+
|
115
|
+
driver: none
|
116
|
+
|
117
|
+
volumes:
|
118
|
+
|
119
|
+
tmp-data:
|
120
|
+
|
121
|
+
log-data:
|
122
|
+
|
123
|
+
db-data:
|
124
|
+
|
125
|
+
```
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
Dockerfile
|
130
|
+
|
131
|
+
```
|
132
|
+
|
133
|
+
FROM ruby:2.5.1
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
RUN apt-get update -qq && \
|
138
|
+
|
139
|
+
apt-get install -y build-essential \
|
140
|
+
|
141
|
+
nodejs \
|
142
|
+
|
143
|
+
imagemagick
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
RUN mkdir /webapp
|
148
|
+
|
149
|
+
WORKDIR /webapp
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
ADD Gemfile /webapp/Gemfile
|
154
|
+
|
155
|
+
ADD Gemfile.lock /webapp/Gemfile.lock
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
RUN bundle install
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
ADD . /webapp
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
RUN mkdir -p tmp/sockets
|
168
|
+
|
169
|
+
```
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
database.yml
|
174
|
+
|
175
|
+
```
|
176
|
+
|
177
|
+
default: &default
|
178
|
+
|
179
|
+
adapter: mysql2
|
180
|
+
|
181
|
+
encoding: utf8
|
182
|
+
|
183
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
184
|
+
|
185
|
+
username: <%= ENV.fetch('MYSQL_USER') { 'user_name' } %>
|
186
|
+
|
187
|
+
password: <%= ENV.fetch('MYSQL_PASSWORD') { 'user_password' } %>
|
188
|
+
|
189
|
+
host: db
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
development:
|
194
|
+
|
195
|
+
<<: *default
|
196
|
+
|
197
|
+
database: webapp_development
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
test:
|
202
|
+
|
203
|
+
<<: *default
|
204
|
+
|
205
|
+
database: webapp_test
|
206
|
+
|
207
|
+
```
|