-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
189 lines (174 loc) · 4.64 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
version: "3"
services:
todo-rabbitmq:
container_name: todo-rabbitmq
image: rabbitmq:3.7.13-management
ports:
- 5672:5672
- 8081:15672
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
todo-redis:
container_name: todo-redis
image: redis:5.0.3
ports:
- 6379:6379
todo-postgres:
container_name: todo-postgres
build:
context: ./todo-postgres
dockerfile: Dockerfile.dev
image: todo-postgres:1.0
ports:
- 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
todo-elastic:
container_name: todo-elastic
image: elasticsearch:6.6.1
ports:
- 9200:9200
- 9300:9300
environment:
- discovery.type=single-node
volumes:
- elastic-data:/usr/share/elasticsearch/data
todo-cache-ingestion:
container_name: todo-cache-ingestion
build:
context: todo-cache-ingestion
dockerfile: ../Dockerfile.nodejs.dev
image: todo-cache-ingestion:1.0
command: sh /app/start.sh
environment:
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
- RABBITMQ_URL=${RABBITMQ_URL}
- STORAGE_SERVICE_URL=${STORAGE_SERVICE_URL}
depends_on:
- todo-redis
- todo-rabbitmq
todo-cache-service:
container_name: todo-cache-service
build:
context: todo-cache-service
dockerfile: ../Dockerfile.nodejs.dev
image: todo-cache-service:1.0
ports:
- 3001:3000
environment:
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
depends_on:
- todo-redis
todo-search-ingestion:
container_name: todo-search-ingestion
build:
context: todo-search-ingestion
dockerfile: ../Dockerfile.nodejs.dev
image: todo-search-ingestion:1.0
command: sh /app/start.sh
environment:
- ELASTICSEARCH_HOST=${ELASTICSEARCH_HOST}
- ELASTICSEARCH_PORT=${ELASTICSEARCH_PORT}
- RABBITMQ_URL=${RABBITMQ_URL}
depends_on:
- todo-elastic
- todo-rabbitmq
todo-search-service:
container_name: todo-search-service
build:
context: todo-search-service
dockerfile: ../Dockerfile.nodejs.dev
image: todo-search-service:1.0
command: sh /app/start.sh
ports:
- 3002:3000
environment:
- ELASTICSEARCH_HOST=${ELASTICSEARCH_HOST}
- ELASTICSEARCH_PORT=${ELASTICSEARCH_PORT}
depends_on:
- todo-elastic
todo-storage-ingestion:
container_name: todo-storage-ingestion
build:
context: todo-storage-ingestion
dockerfile: ../Dockerfile.nodejs.dev
image: todo-storage-ingestion:1.0
command: sh /app/start.sh
environment:
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_DATABASE=${POSTGRES_DATABASE}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- RABBITMQ_URL=${RABBITMQ_URL}
depends_on:
- todo-postgres
- todo-rabbitmq
todo-storage-service:
container_name: todo-storage-service
build:
context: todo-storage-service
dockerfile: ../Dockerfile.nodejs.dev
image: todo-storage-service:1.0
ports:
- 3003:3000
environment:
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_DATABASE=${POSTGRES_DATABASE}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
depends_on:
- todo-postgres
todo-api-gateway:
container_name: todo-api-gateway
build:
context: todo-api-gateway
dockerfile: ../Dockerfile.nodejs.dev
image: todo-api-gateway:1.0
command: sh /app/start.sh
ports:
- 3000:3000
environment:
- RABBITMQ_URL=${RABBITMQ_URL}
- CACHE_SERVICE_URL=${CACHE_SERVICE_URL}
- SEARCH_SERVICE_URL=${SEARCH_SERVICE_URL}
- STORAGE_SERVICE_URL=${STORAGE_SERVICE_URL}
depends_on:
- todo-cache-service
- todo-cache-ingestion
- todo-search-service
- todo-search-ingestion
- todo-storage-service
- todo-storage-ingestion
- todo-rabbitmq
todo-view:
container_name: todo-view
build:
context: ./todo-view
dockerfile: Dockerfile.dev
image: todo-view:1.0
ports:
- 4200:4200
volumes:
- ${PWD}/todo-view:/usr/src/app
- /usr/src/app/node_modules
depends_on:
- todo-api-gateway
todo-proxy:
container_name: todo-proxy
build:
context: ./todo-proxy
dockerfile: Dockerfile.dev
image: todo-proxy:1.0
ports:
- 8080:80
depends_on:
- todo-api-gateway
- todo-view
volumes:
postgres-data:
elastic-data: