-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (53 loc) · 1.23 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
version: '3.8'
services:
frontend:
build:
context: ./frontend
ports:
- "80:80"
environment:
- REACT_APP_BACKEND_URL=http://localhost:8080
depends_on:
- backend
backend:
build:
context: ./backend
ports:
- "8080:8080"
environment:
- MONGODB_URI=mongodb://mongo:27017
- MONGODB_DATABASE=weatherApp
- OPENWEATHERMAP_API_KEY=9bd398148984a3f361fa58d491cc53e5
- RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/
- REACT_APP_FRONTEND_URL=http://localhost
- JWT_SECRET_KEY=secret_key
- TOKEN_EXPIRATION_TIME=5
depends_on:
wait-for-rmq:
condition: service_completed_successfully
wait-for-db:
condition: service_completed_successfully
command: ./main
wait-for-rmq:
image: atkrad/wait4x
depends_on:
- rabbitmq
command: tcp rabbitmq:5672 -t 300s -i 250ms
wait-for-db:
image: atkrad/wait4x
depends_on:
- mongo
command: tcp mongo:27017 -t 300s -i 250ms
mongo:
image: mongo:4.4
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
rabbitmq:
image: rabbitmq:3-management
ports:
- "5672:5672"
- "15672:15672"
volumes:
mongo-data: