forked from ByCodersTec/desafio-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
85 lines (79 loc) · 1.69 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
version: "3"
services:
frontend:
build:
context: ./frontend
args:
- REACT_APP_API_URL=/api
depends_on:
- api
ports:
- "8081:80"
restart: on-failure
api:
build: ./api
depends_on:
- broker
- db
environment:
- DEBUG=True
- DB_URI=postgresql://postgres:postgres@db:5432/cnab
- PROCESS_AREA=/opt/process_area
- BROKER_HOST=broker
- BROKER_USER=guest
- BROKER_PASS=guest
- BROKER_PORT=5672
# ports:
# - "8000:8000"
volumes:
- process_area:/opt/process_area
restart: on-failure
worker:
build: ./worker
depends_on:
- broker
environment:
- PROCESS_AREA=/opt/process_area
- BROKER_HOST=broker
- BROKER_USER=guest
- BROKER_PASS=guest
- BROKER_PORT=5672
- QUEUE=file_parser_queue
- ROUTING_KEY=file_parser
volumes:
- process_area:/opt/process_area
restart: on-failure
events:
build: ./events
depends_on:
- db
- broker
environment:
- DB_URI=postgresql://postgres:postgres@db:5432/cnab
- BROKER_HOST=broker
- BROKER_USER=guest
- BROKER_PASS=guest
- BROKER_PORT=5672
- QUEUE=events_queue
- ROUTING_KEY=events
volumes:
- process_area:/opt/process_area
restart: on-failure
db:
image: postgres:11-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- POSTGRES_DB=cnab
broker:
image: rabbitmq:3-management-alpine
# ports:
# - "5672:5672"
# - "8080:15672"
volumes:
- data:/var/lib/rabbitmq
volumes:
process_area:
data: