質問編集履歴
1
docker-compose.ymlのコードを追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -84,6 +84,84 @@
|
|
84
84
|
|
85
85
|
|
86
86
|
|
87
|
+
```dockercomposeyml
|
88
|
+
|
89
|
+
version: '3'
|
90
|
+
|
91
|
+
services:
|
92
|
+
|
93
|
+
app:
|
94
|
+
|
95
|
+
build:
|
96
|
+
|
97
|
+
context: .
|
98
|
+
|
99
|
+
env_file:
|
100
|
+
|
101
|
+
- ./environments/db.env
|
102
|
+
|
103
|
+
command: bundle exec puma -C config/puma.rb
|
104
|
+
|
105
|
+
volumes:
|
106
|
+
|
107
|
+
- .:/webapp
|
108
|
+
|
109
|
+
- public-data:/webapp/public
|
110
|
+
|
111
|
+
- tmp-data:/webapp/tmp
|
112
|
+
|
113
|
+
- log-data:/webapp/log
|
114
|
+
|
115
|
+
depends_on:
|
116
|
+
|
117
|
+
- db
|
118
|
+
|
119
|
+
db:
|
120
|
+
|
121
|
+
image: mysql:5.7
|
122
|
+
|
123
|
+
env_file:
|
124
|
+
|
125
|
+
- ./environments/db.env
|
126
|
+
|
127
|
+
volumes:
|
128
|
+
|
129
|
+
- db-data:/var/lib/mysql
|
130
|
+
|
131
|
+
web:
|
132
|
+
|
133
|
+
build:
|
134
|
+
|
135
|
+
context: containers/nginx
|
136
|
+
|
137
|
+
volumes:
|
138
|
+
|
139
|
+
- public-data:/webapp/public
|
140
|
+
|
141
|
+
- tmp-data:/webapp/tmp
|
142
|
+
|
143
|
+
ports:
|
144
|
+
|
145
|
+
- 80:80
|
146
|
+
|
147
|
+
depends_on:
|
148
|
+
|
149
|
+
- app
|
150
|
+
|
151
|
+
volumes:
|
152
|
+
|
153
|
+
public-data:
|
154
|
+
|
155
|
+
tmp-data:
|
156
|
+
|
157
|
+
log-data:
|
158
|
+
|
159
|
+
db-data:
|
160
|
+
|
161
|
+
```
|
162
|
+
|
163
|
+
|
164
|
+
|
87
165
|
### 試したこと
|
88
166
|
|
89
167
|
|