-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
113 lines (107 loc) · 2.47 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
services:
user:
build:
context: ./backend/user-service
dockerfile: Dockerfile
container_name: user-service
environment:
- DB_CLOUD_URI=${DB_CLOUD_URI}
- DB_LOCAL_URI=${DB_LOCAL_URI}
- PORT=8000
- ENV=PROD
- JWT_SECRET=${JWT_SECRET}
ports:
- "8000:8000"
networks:
- app-network
questions:
build:
context: ./backend/questions_service
dockerfile: Dockerfile
container_name: questions-service
environment:
- PORT=8001
- MONGO_URL=${MONGO_URL}
- USER_SERVICE_URL=http://user:8000
ports:
- "8001:8001"
networks:
- app-network
depends_on:
- user
rabbitmq:
image: "rabbitmq:4"
container_name: rabbitmq
ports:
- "15672:15672"
- "5672:5672"
networks:
- app-network
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "check_port_connectivity"]
interval: 5s
timeout: 10s
retries: 5
start_period: 10s
collaboration:
build:
context: ./backend/collaboration-service
dockerfile: Dockerfile
container_name: collaboration-service
environment:
- PORT=8003
- LOCAL_RABBITMQ_URL=amqp://rabbitmq:5672
- COLLAB_SERVICE_URL=http://collaboration:8003
- MISTRAL_API_KEY=${MISTRAL_API_KEY}
ports:
- "8003:8003"
networks:
- app-network
depends_on:
rabbitmq:
condition: service_healthy
user:
condition: service_started
questions:
condition: service_started
matching:
build:
context: ./backend/matching-service
dockerfile: Dockerfile
container_name: matching-service
environment:
- PORT=8002
- LOCAL_RABBITMQ_URL=amqp://rabbitmq:5672
- COLLAB_SERVICE_URL=http://collaboration:8003
- QUESTIONS_API_URL=http://questions:8001
- MISTRAL_API_KEY=${MISTRAL_API_KEY}
ports:
- "8002:8002"
networks:
- app-network
depends_on:
rabbitmq:
condition: service_healthy
user:
condition: service_started
questions:
condition: service_started
collaboration:
condition: service_started
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: frontend
ports:
- "3000:3000"
networks:
- app-network
depends_on:
- user
- questions
- matching
- collaboration
networks:
app-network:
driver: bridge