-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (55 loc) · 1.12 KB
/
docker-compose.yml
File metadata and controls
58 lines (55 loc) · 1.12 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: '3.7'
services:
php:
build:
context: ./
dockerfile: Dockerfile
target: vc_php
image: ${PHP_IMAGE:-vc/php}
depends_on:
- db
volumes:
- .:/var/www/html:rw,cached
- ~/.ssh:/root/.ssh
# if you develop on Linux, you may use a bind-mounted host directory instead
# - ./var:/var/www/html/var:rw
networks:
- frontend
- backend
nginx:
build:
context: ./
target: vc_nginx
image: ${NGINX_IMAGE:-vc/nginx}
volumes:
- ./docker-services/nginx/conf.d-dev:/etc/nginx/conf.d
- .:/var/www/html
depends_on:
- php
ports:
- "80:80"
networks:
frontend:
aliases:
- localhost
db:
image: library/mysql:8
environment:
- MYSQL_DATABASE=vc
- MYSQL_USER=vc
- MYSQL_PASSWORD=vc123
- MYSQL_ROOT_PASSWORD=vc123
volumes:
- mysql_data:/var/lib/mysql
- ./docker-services/db/conf.d:/etc/mysql/conf.d
ports:
- "3306:3306"
networks:
- backend
volumes:
mysql_data:
networks:
frontend:
driver: bridge
backend:
driver: bridge