質問編集履歴
4
追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -264,4 +264,12 @@
|
|
264
264
|
|
265
265
|
変化はありません。
|
266
266
|
|
267
|
-
mysql
|
267
|
+
mysqlのログです。
|
268
|
+
|
269
|
+
```<pre><font color="#4E9A06"><b>saito@saito</b></font>:<font color="#3465A4"><b>~</b></font>$ docker service logs wp_mysql
|
270
|
+
|
271
|
+
wp_mysql.1.s6yobt9glaca@manager1 | 2021-04-07 00:00:05+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.33-1debian10 started.
|
272
|
+
|
273
|
+
wp_mysql.1.s6yobt9glaca@manager1 | 2021-04-07 00:00:05+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
|
274
|
+
|
275
|
+
wp_mysql.1.s6yobt9glaca@manager1 | 2021-04-07 00:00:05+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server
|
3
追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -144,12 +144,124 @@
|
|
144
144
|
|
145
145
|
```
|
146
146
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
147
|
+
いろいろ調べて以下のように修正しました。
|
148
|
+
|
149
|
+
```ここに言語を入力
|
150
|
+
|
151
|
+
version: '3.4'
|
152
|
+
|
153
|
+
services:
|
154
|
+
|
155
|
+
wrodpress:
|
156
|
+
|
157
|
+
image: wordpress
|
158
|
+
|
159
|
+
ports:
|
160
|
+
|
161
|
+
- 8000:80
|
162
|
+
|
163
|
+
restart: always
|
164
|
+
|
165
|
+
environment:
|
166
|
+
|
167
|
+
WORDPRESS_DB_HOST: mysql
|
168
|
+
|
169
|
+
WORDPRESS_DB_NAME: wordpress
|
170
|
+
|
171
|
+
WORDPRESS_DB_USER: wordpress
|
172
|
+
|
173
|
+
WORDPRESS_DB_PASSWORD: samplewp
|
174
|
+
|
175
|
+
deploy:
|
176
|
+
|
177
|
+
replicas: 2
|
178
|
+
|
179
|
+
placement:
|
180
|
+
|
181
|
+
constraints:
|
182
|
+
|
183
|
+
- node.role == worker
|
184
|
+
|
185
|
+
depends_on:
|
186
|
+
|
187
|
+
- mysql
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
mysql:
|
192
|
+
|
193
|
+
image: mysql:5.7
|
194
|
+
|
195
|
+
environment:
|
196
|
+
|
197
|
+
MYSQL_ROOT_PASSWORD: wordpress
|
198
|
+
|
199
|
+
MYSQL_DATABASE: wordpress
|
200
|
+
|
201
|
+
MYSQL_USER: wordpress
|
202
|
+
|
203
|
+
MYSQL_PASSWROD: samplewp
|
204
|
+
|
205
|
+
volumes:
|
206
|
+
|
207
|
+
- mysql_vol:/var/lib/mysql
|
208
|
+
|
209
|
+
deploy:
|
210
|
+
|
211
|
+
replicas: 1
|
212
|
+
|
213
|
+
placement:
|
214
|
+
|
215
|
+
constraints:
|
216
|
+
|
217
|
+
- node.hostname == manager1
|
218
|
+
|
219
|
+
volumes:
|
220
|
+
|
221
|
+
mysql_vol:
|
222
|
+
|
223
|
+
~
|
224
|
+
|
225
|
+
```
|
226
|
+
|
227
|
+
しかし、プラウザでは未だ、「Error establishing a database connection」と表示され変わりません。
|
228
|
+
|
229
|
+
docker service logs wb_wordpressの実行結果は
|
230
|
+
|
231
|
+
```ここに言語を入力
|
232
|
+
|
233
|
+
aito@saito:~$ docker service logs wp_wrodpress
|
234
|
+
|
235
|
+
wp_wrodpress.1.5tt871tjgpid@worker1 | WordPress not found in /var/www/html - copying now...
|
236
|
+
|
237
|
+
wp_wrodpress.1.5tt871tjgpid@worker1 | Complete! WordPress has been successfully copied to /var/www/html
|
238
|
+
|
239
|
+
wp_wrodpress.1.5tt871tjgpid@worker1 | No 'wp-config.php' found in /var/www/html, but 'WORDPRESS_...' variables supplied; copying 'wp-config-docker.php' (WORDPRESS_DB_HOST WORDPRESS_DB_NAME WORDPRESS_DB_PASSWORD WORDPRESS_DB_USER)
|
240
|
+
|
241
|
+
wp_wrodpress.1.5tt871tjgpid@worker1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.1.77. Set the 'ServerName' directive globally to suppress this message
|
242
|
+
|
243
|
+
wp_wrodpress.1.5tt871tjgpid@worker1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.1.77. Set the 'ServerName' directive globally to suppress this message
|
244
|
+
|
245
|
+
wp_wrodpress.1.5tt871tjgpid@worker1 | [Tue Apr 06 09:59:29.530792 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.16 configured -- resuming normal operations
|
246
|
+
|
247
|
+
wp_wrodpress.1.5tt871tjgpid@worker1 | [Tue Apr 06 09:59:29.531345 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
|
248
|
+
|
249
|
+
wp_wrodpress.2.m9kttpai6f2l@worker1 | WordPress not found in /var/www/html - copying now...
|
250
|
+
|
251
|
+
wp_wrodpress.2.m9kttpai6f2l@worker1 | Complete! WordPress has been successfully copied to /var/www/html
|
252
|
+
|
253
|
+
wp_wrodpress.2.m9kttpai6f2l@worker1 | No 'wp-config.php' found in /var/www/html, but 'WORDPRESS_...' variables supplied; copying 'wp-config-docker.php' (WORDPRESS_DB_HOST WORDPRESS_DB_NAME WORDPRESS_DB_PASSWORD WORDPRESS_DB_USER)
|
254
|
+
|
255
|
+
wp_wrodpress.2.m9kttpai6f2l@worker1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.1.78. Set the 'ServerName' directive globally to suppress this message
|
256
|
+
|
257
|
+
wp_wrodpress.2.m9kttpai6f2l@worker1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.1.78. Set the 'ServerName' directive globally to suppress this message
|
258
|
+
|
259
|
+
wp_wrodpress.2.m9kttpai6f2l@worker1 | [Tue Apr 06 09:59:29.515967 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.16 configured -- resuming normal operations
|
260
|
+
|
261
|
+
wp_wrodpress.2.m9kttpai6f2l@worker1 | [Tue Apr 06 09:59:29.518052 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
|
262
|
+
|
263
|
+
```
|
264
|
+
|
265
|
+
変化はありません。
|
266
|
+
|
267
|
+
mysqlにはログがありません。
|
2
脱字
test
CHANGED
File without changes
|
test
CHANGED
@@ -84,9 +84,9 @@
|
|
84
84
|
|
85
85
|
environment:
|
86
86
|
|
87
|
-
|
87
|
+
WORDPRESS_DB_HOST: mysql
|
88
88
|
|
89
|
-
|
89
|
+
WORDPRESS_DB_PASSWORD: samplewp
|
90
90
|
|
91
91
|
|
92
92
|
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|