-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (33 loc) · 721 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (33 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version: "3.7"
services:
web:
build:
context: .
dockerfile: container-build/web/Dockerfile
environment:
- MYSQL_DATABASE=dbname
- MYSQL_USER=dbuser
- MYSQL_PASSWORD=654321
- MYSQL_HOST=db
extra_hosts:
- "host.docker.internal:${DOCKER_HOST_IP}"
ports:
- "8080:80"
volumes:
- .:/var/www/html
depends_on:
- db
db:
image: mysql:5.7
ports:
- "6603:3306"
environment:
- MYSQL_ROOT_PASSWORD=654321
- MYSQL_USER=dbuser
- MYSQL_PASSWORD=654321
- MYSQL_DATABASE=dbname
volumes:
- "mysql_data:/var/lib/mysql"
- ./data/schema.sql:/docker-entrypoint-initdb.d/schema.sql
volumes:
mysql_data: { driver: local }