-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (83 loc) · 1.76 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
88
89
90
91
version: "3.7"
services:
producer:
build:
context: ./producer
dockerfile: Dockerfile
working_dir: /usr/src/app
volumes:
- ./producer:/usr/src/app
networks:
- app-network
environment:
- RABBIT_HOST_IP=192.168.29.135
command: python producer.py -p 5672 -s ${RABBIT_HOST_IP} -m "Hello" -r 30
links:
- rabbitmq3
consumer:
build:
context: ./consumer
dockerfile: Dockerfile
working_dir: /usr/src/app
volumes:
- ./consumer:/usr/src/app
networks:
- app-network
command: python consumer.py -p 5672 -s ${RABBIT_HOST_IP}
links:
- rabbitmq3
mysql:
image: mysql:latest
ports:
- "3306:3306"
volumes:
- ./config/mysql/mysql.cnf:/etc/mysql/conf.d/mysql.cnf:ro
- ./data/mysql:/var/lib/mysql
networks:
- app-network
environment:
MYSQL_ROOT_PASSWORD: "root"
TZ: 'Asia/kolkata'
mongo:
image: mongo:latest
ports:
- "27017:27017"
volumes:
- ./data/mongo:/data/db
networks:
- app-network
redis:
image: redis:latest
ports:
- "6379:6379"
volumes:
- ./data/redis:/data
networks:
- app-network
rabbitmq3:
container_name: "rabbitmq"
image: rabbitmq:3.8-management-alpine
ports:
- '5672:5672'
- '15672:15672'
volumes:
- ./data/rabbitmq:/var/lib/rabbitmq
networks:
- app-network
pythonapp:
container_name: "python-npm-app"
build:
context: ./python-app
dockerfile: Dockerfile
working_dir: /home/pn/app
ports:
- '5000:5000'
stdin_open: true
tty: true
volumes:
- ./data/python-app:/home/pn/app
networks:
- app-network
networks:
app-network:
driver: bridge