質問編集履歴
1
docker-compose.yml追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -80,7 +80,63 @@
|
|
80
80
|
|
81
81
|
WORKDIR /var/www/src
|
82
82
|
|
83
|
+
```
|
83
84
|
|
85
|
+
|
86
|
+
|
87
|
+
```dockercomposeyml
|
88
|
+
|
89
|
+
version: "3"
|
90
|
+
|
91
|
+
services:
|
92
|
+
|
93
|
+
nginx:
|
94
|
+
|
95
|
+
image: nginx
|
96
|
+
|
97
|
+
ports:
|
98
|
+
|
99
|
+
- "80:80"
|
100
|
+
|
101
|
+
depends_on:
|
102
|
+
|
103
|
+
- php
|
104
|
+
|
105
|
+
volumes:
|
106
|
+
|
107
|
+
- ./containers/nginx/nginx.conf:/etc/nginx/nginx.conf
|
108
|
+
|
109
|
+
- ./containers/nginx/conf.d:/etc/nginx/conf.d
|
110
|
+
|
111
|
+
- ./src:/var/www/src
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
php:
|
116
|
+
|
117
|
+
build: ./containers/php
|
118
|
+
|
119
|
+
working_dir: /var/www/src
|
120
|
+
|
121
|
+
volumes:
|
122
|
+
|
123
|
+
- ./src:/var/www/src
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
mysql:
|
128
|
+
|
129
|
+
image: mysql:8.0
|
130
|
+
|
131
|
+
environment:
|
132
|
+
|
133
|
+
MYSQL_DATABASE: example
|
134
|
+
|
135
|
+
MYSQL_ROOT_PASSWORD: secret
|
136
|
+
|
137
|
+
ports:
|
138
|
+
|
139
|
+
- "3306:3306"
|
84
140
|
|
85
141
|
|
86
142
|
|