-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (81 loc) · 1.9 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: '3'
services:
server:
#image: bmcristi/idp_project_findatutor:latest
# links this service to another container. See https://medium.com/@shamir.stav_83310/dockerizing-a-flask-mysql-app-with-docker-compose-c4f51d20b40d
build: ./services
links:
- db
depends_on:
- db
- redis
ports:
- "5000:5000"
networks:
db_netw:
ipv4_address: 172.31.0.4
volumes:
- .:/var/lib/tutorFinder_service
worker:
#image: bmcristi/idp_project_findatutor:worker
build: ./worker
depends_on:
- db
- redis
networks:
db_netw:
ipv4_address: 172.31.0.5
db:
image: mysql:5.7
ports:
- "3307"
- "32000:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: tutorFinder
MYSQL_USER: bmc
MYSQL_PASSWORD: student
deploy:
placement:
constraints: [node.role == manager]
networks:
db_netw:
ipv4_address: 172.31.0.2
volumes:
- ./db_data_homew:/var/lib/mysql
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
restart: always
redis:
image: "redis:alpine"
command: redis-server --requirepass root
ports:
- "6379:6379"
environment:
- REDIS_REPLICATION_MODE=master
networks:
db_netw:
ipv4_address: 172.31.0.3
volumes:
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
grafana:
image: grafana/grafana:5.1.0
ports:
- 3000:3000
networks:
db_netw:
ipv4_address: 172.31.0.6
volumes:
- grafana-storage:/var/lib/grafana
#user: "104"
volumes:
db_data_homew: {}
grafana-storage:
# See https://github.com/docker/labs/blob/master/networking/A2-bridge-networking.md
# and https://docs.docker.com/compose/networking/
networks:
db_netw:
driver: bridge
ipam:
driver: default
config:
- subnet: "172.31.0.0/16"