-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
executable file
·74 lines (69 loc) · 1.48 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
version: '3.7'
services:
db:
image: mysql:5.7
container_name: mysql
hostname: mysql
ports:
- "3306:3306"
volumes:
- ./create_database.sql:/docker-entrypoint-initdb.d/create_database.sql
environment:
- MYSQL_ROOT_PASSWORD=teste12321
networks:
- desafio
rabbitmq:
image: rabbitmq:3.7-management
container_name: rabbitmq
hostname: rabbitmq
ports:
- "15672:15672"
- "5672:5672"
environment:
- RABBITMQ_DEFAULT_USER=teste
- RABBITMQ_DEFAULT_PASS=teste12321
networks:
- desafio
py:
image: py
build:
context: hello-python/
dockerfile: Dockerfile-python
container_name: py
hostname: py
depends_on:
- "nd"
ports:
- "8000:8000"
environment:
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_QUEUE=hello
#command: python app.py
networks:
- desafio
nd:
image: nd
build:
context: hello-node/
dockerfile: Dockerfile-node
container_name: nd
hostname: nd
depends_on:
- "db"
- "rabbitmq"
environment:
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_QUEUE=hello
- MYSQL_HOST=mysql
- MYSQL_USER=root
- MYSQL_PASSWORD=teste12321
- MYSQL_DB=hello
command: sh -c "sh wait-for mysql:3306 -t 40 && sh wait-for rabbitmq:5672 -- node app.js"
networks:
- desafio
volumes: {}
networks:
desafio:
driver: bridge