-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
117 lines (112 loc) · 2.52 KB
/
docker-compose.dev.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
114
115
116
117
version: '4'
services:
orders-service:
environment:
NODE_ENV: development
HOST: 0.0.0.0
PORT: 3000
LOG_LEVEL: debug
DATABASE_URL: mongodb://admin:admin@database:27017/database?retryWrites=true&w=majority&authSource=admin
QUEUE_URL: amqp://user:pass@queue:5672
PAYMENTS_SERVICE_URL: http://payments-service:3001
build:
context: ./orders
dockerfile: Dockerfile
command: sh -c "sleep 15 && npm run push && node /app/dist"
ports:
- 3000:3000
expose:
- 3000
links:
- payments-service
- database
- queue
depends_on:
- payments-service
- database
- queue
restart: always
networks:
- default
payments-service:
environment:
NODE_ENV: development
HOST: 0.0.0.0
PORT: 3001
LOG_LEVEL: debug
DATABASE_URL: mongodb://admin:admin@database:27017/database?retryWrites=true&w=majority&authSource=admin
QUEUE_URL: amqp://user:pass@queue:5672
build:
context: ./payments
dockerfile: Dockerfile
command: sh -c "sleep 15 && npm run push && node /app/dist"
ports:
- 3001:3001
expose:
- 3001
links:
- database
- queue
depends_on:
- database
- queue
restart: always
networks:
- default
emails-service:
environment:
NODE_ENV: development
HOST: 0.0.0.0
PORT: 3003
LOG_LEVEL: debug
QUEUE_URL: amqp://user:pass@queue:5672
build:
context: ./emails
dockerfile: Dockerfile
command: sh -c "sleep 15 && node /app/dist"
ports:
- 3003:3003
expose:
- 3003
links:
- queue
depends_on:
- queue
restart: always
networks:
- default
database:
image: bitnami/mongodb:latest
environment:
- MONGODB_ADVERTISED_HOSTNAME=database
- MONGODB_REPLICA_SET_MODE=primary
- MONGODB_ROOT_USER=admin
- MONGODB_ROOT_PASSWORD=admin
- MONGODB_REPLICA_SET_KEY=replicasetkey123
- MONGO_INITDB_DATABASE=database
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=admin
ports:
- 27017:27017
expose:
- 27017
restart: always
networks:
- default
queue:
image: bitnami/rabbitmq:latest
environment:
- RABBITMQ_DEFAULT_USER=user
- RABBITMQ_DEFAULT_PASS=pass
ports:
- 5672:5672
- 15672:15672
expose:
- 5672
- 15672
restart: always
networks:
- default
networks:
default:
driver: bridge