質問編集履歴
2
ymlファイルの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -95,3 +95,47 @@
|
|
95
95
|
```
|
96
96
|
|
97
97
|
との表記が出ます。
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
docker-compose.ymlファイルの内容を追記します。
|
102
|
+
|
103
|
+
```docker-compose.yml
|
104
|
+
|
105
|
+
version: '3'
|
106
|
+
|
107
|
+
services:
|
108
|
+
|
109
|
+
db:
|
110
|
+
|
111
|
+
image: mysql:5.7
|
112
|
+
|
113
|
+
environment:
|
114
|
+
|
115
|
+
MYSQL_USER: root
|
116
|
+
|
117
|
+
MYSQL_ROOT_PASSWORD: password
|
118
|
+
|
119
|
+
volumes:
|
120
|
+
|
121
|
+
- ./tmp/db:/var/lib/mysql/data
|
122
|
+
|
123
|
+
web:
|
124
|
+
|
125
|
+
build: .
|
126
|
+
|
127
|
+
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
|
128
|
+
|
129
|
+
volumes:
|
130
|
+
|
131
|
+
- .:/myapp
|
132
|
+
|
133
|
+
ports:
|
134
|
+
|
135
|
+
- "3000:3000"
|
136
|
+
|
137
|
+
depends_on:
|
138
|
+
|
139
|
+
- db
|
140
|
+
|
141
|
+
```
|
1
docker-compose psの結果
test
CHANGED
File without changes
|
test
CHANGED
@@ -73,3 +73,25 @@
|
|
73
73
|
(See full trace by running task with --trace)
|
74
74
|
|
75
75
|
```
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
回答ありがとうございます。
|
80
|
+
|
81
|
+
psを実行したところ、
|
82
|
+
|
83
|
+
```
|
84
|
+
|
85
|
+
docker-compose ps
|
86
|
+
|
87
|
+
Name Command State Ports
|
88
|
+
|
89
|
+
-----------------------------------------------------------------------
|
90
|
+
|
91
|
+
rails-community_db_1 docker-entrypoint.sh mysqld Exit 1
|
92
|
+
|
93
|
+
rails-community_web_1 entrypoint.sh bash -c rm - ... Exit 1
|
94
|
+
|
95
|
+
```
|
96
|
+
|
97
|
+
との表記が出ます。
|