-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (53 loc) · 1.01 KB
/
docker-compose.yml
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
version: '2'
services:
consul:
image: "gliderlabs/consul-server"
command: "-server -bootstrap"
hostname: consul
container_name: consul
ports:
- "8400:8400"
- "8500:8500"
- "172.17.0.1:53:8600/udp"
networks:
- my_net
registrator:
image: "gliderlabs/registrator"
command: "-internal consul://172.17.0.1:8500"
container_name: registrator
hostname: registrator
volumes:
- /var/run/docker.sock:/tmp/docker.sock
depends_on:
- consul
networks:
- my_net
db:
image: "mysql:5.5"
container_name: mysql
hostname: mysql
volumes:
# - ./data:/var/lib/mysql
- ./mydb:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: root
depends_on:
- registrator
ports:
- 3306:3306
networks:
- my_net
web:
build: .
depends_on:
- db
- consul
ports:
- 8080:8080
volumes:
- .:/code
networks:
- my_net
networks:
my_net:
driver: bridge