質問編集履歴

1

詳細の追記

2020/05/18 15:20

投稿

wwwww
wwwww

スコア41

test CHANGED
File without changes
test CHANGED
@@ -54,7 +54,7 @@
54
54
 
55
55
  ### ■詳細
56
56
 
57
- ### ●docker-compose.yml(部分抜粋)
57
+ ### ●docker-compose.yml
58
58
 
59
59
  ```ここに言語を入力
60
60
 
@@ -80,13 +80,37 @@
80
80
 
81
81
  volumes:
82
82
 
83
- - db-volume:/var/lib/mysql
83
+ # - db-volume:/var/lib/mysql
84
84
 
85
85
  - ./db-volume:/docker-entrypoint-initdb.d
86
86
 
87
-
87
+ environment:
88
+
88
-
89
+ - MYSQL_ROOT_PASSWORD=dbpass01
90
+
91
+ - MYSQL_ROOT_USER=root
92
+
93
+ - MYSQL_DATABASE=wordpress
94
+
95
+ - MYSQL_USER=wp_user
96
+
97
+ - MYSQL_PASSWORD=dbpass01
98
+
99
+ command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
100
+
101
+ volumes_from:
102
+
103
+ - db-container
104
+
105
+ depends_on:
106
+
107
+ - db-container
108
+
109
+ restart: always
110
+
89
-  ※中略
111
+ ports:
112
+
113
+ - 3306:80
90
114
 
91
115
 
92
116
 
@@ -94,13 +118,53 @@
94
118
 
95
119
  pma-container:
96
120
 
121
+ image: phpmyadmin/phpmyadmin
122
+
123
+ environment:
124
+
125
+ - PMA_HOST=mysql-container
126
+
127
+ - PMA_ROOT_PASSWORD=dbpass01
128
+
129
+ - PMA_USER=wp_user
130
+
131
+ - PMA_PASSWORD=dbpass01
132
+
133
+ ports:
134
+
135
+ - 8080:80
136
+
97
137
  depends_on:
98
138
 
99
139
  - mysql-container
100
140
 
101
-
141
+ restart: always
142
+
143
+
144
+
102
-
145
+ #wordpress
146
+
147
+ wp-container:
148
+
149
+ image: wordpress
150
+
151
+ environment:
152
+
153
+ - WORDPRESS_DB_HOST=mysql-container
154
+
155
+ - WORDPRESS_DB_USER=root
156
+
157
+ - WORDPRESS_DB_PASSWORD=dbpass01
158
+
103
-  ※中略
159
+ ports:
160
+
161
+ - 80:80
162
+
163
+ depends_on:
164
+
165
+ - mysql-container
166
+
167
+ restart: always
104
168
 
105
169
 
106
170