質問編集履歴
1
docker-compose.ymlの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -85,3 +85,91 @@
|
|
85
85
|
|
86
86
|
|
87
87
|
```
|
88
|
+
|
89
|
+
```ここに言語を入力
|
90
|
+
|
91
|
+
version : '3'
|
92
|
+
|
93
|
+
services:
|
94
|
+
|
95
|
+
db:
|
96
|
+
|
97
|
+
image: mysql:5.7
|
98
|
+
|
99
|
+
environment:
|
100
|
+
|
101
|
+
MYSQL_ROOT_PASSWORD: password
|
102
|
+
|
103
|
+
MYSQL_DATABASE: root
|
104
|
+
|
105
|
+
volumes:
|
106
|
+
|
107
|
+
- ./docker/db/data:/var/lib/mysql
|
108
|
+
|
109
|
+
ports:
|
110
|
+
|
111
|
+
- "3306:3306"
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
web:
|
116
|
+
|
117
|
+
tty: true
|
118
|
+
|
119
|
+
stdin_open: true
|
120
|
+
|
121
|
+
build: .
|
122
|
+
|
123
|
+
environment:
|
124
|
+
|
125
|
+
EDITOR: vim
|
126
|
+
|
127
|
+
command: /bin/sh -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
|
128
|
+
|
129
|
+
volumes:
|
130
|
+
|
131
|
+
- .:/my_song
|
132
|
+
|
133
|
+
ports:
|
134
|
+
|
135
|
+
- "3000:3000"
|
136
|
+
|
137
|
+
links:
|
138
|
+
|
139
|
+
- db
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
server:
|
144
|
+
|
145
|
+
build:
|
146
|
+
|
147
|
+
context: containers/nginx
|
148
|
+
|
149
|
+
volumes:
|
150
|
+
|
151
|
+
- ./nginx/log:/var/log/nginx
|
152
|
+
|
153
|
+
- public-data:/my_song/public
|
154
|
+
|
155
|
+
ports:
|
156
|
+
|
157
|
+
- 80:80
|
158
|
+
|
159
|
+
depends_on:
|
160
|
+
|
161
|
+
- web
|
162
|
+
|
163
|
+
volumes:
|
164
|
+
|
165
|
+
public-data:
|
166
|
+
|
167
|
+
tmp-data:
|
168
|
+
|
169
|
+
log-data:
|
170
|
+
|
171
|
+
db-data:
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
```
|