-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
151 lines (149 loc) · 3.97 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
version: "3.8"
services:
mongodb:
container_name: garuda_mongo
image: mongo:latest
restart: unless-stopped
healthcheck:
test: test $$(echo "rs.initiate().ok || rs.status().ok" | mongo --quiet) -eq 1
interval: 10s
start_period: 30s
command: "--bind_ip_all --replSet MainRepSet"
ports:
- 27017:27017
volumes:
- db:/data/db
db_middleware_writer:
container_name: garudadbmiddlewarewriter
image: acharyapranav/garuda:db_middleware-$PROJECT
depends_on:
- mongodb
build: ./db_middleware
environment:
- DB_HOSTS=garuda_mongo:27017
- DB_DATABASE=garuda
- APP_PORT=3001
- APP_TYPE=writer
- DB_REPLICA_SET=MainRepSet
- DB_REPLICA_SET_PREFERENCE=secondaryPreferred
- AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
restart: unless-stopped
ports:
- 3001:3001
stdin_open: true
tty: true
db_middleware_reader:
container_name: garudadbmiddlewarereader
image: acharyapranav/garuda:db_middleware-$PROJECT
depends_on:
- mongodb
build: ./db_middleware
environment:
- DB_HOSTS=garuda_mongo:27017
- DB_DATABASE=garuda
- APP_PORT=3002
- APP_TYPE=reader
- DB_REPLICA_SET=MainRepSet
- DB_REPLICA_SET_PREFERENCE=secondaryPreferred
restart: unless-stopped
ports:
- 3002:3002
stdin_open: true
tty: true
api_gateway:
container_name: garuda_api_gateway
image: acharyapranav/garuda:api_gateway-$PROJECT
depends_on:
- mongodb
- db_middleware_writer
- db_middleware_reader
- rabbitmq
build: ./apigateway
environment:
- DB_MIDDLEWARE_WRITER_HOST=garudadbmiddlewarewriter
- DB_MIDDLEWARE_WRITER_PORT=3001
- DB_MIDDLEWARE_READER_HOST=garudadbmiddlewarereader
- DB_MIDDLEWARE_READER_PORT=3002
- RABBITMQ_HOST=garuda_rabbitmq
- RABBITMQ_PORT=5672
- APP_PORT=5000
restart: unless-stopped
ports:
- 5000:5000
stdin_open: true
tty: true
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: 'garuda_rabbitmq'
hostname: "garuda_rabbitmq"
restart: unless-stopped
ports:
- 5672:5672
- 15672:15672
volumes:
- queue:/var/lib/rabbitmq/
- queue:/var/log/rabbitmq
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:15672" ]
interval: 30s
timeout: 10s
retries: 5
queue_worker:
container_name: garuda_queue_worker
image: acharyapranav/garuda:queue_worker-$PROJECT
restart: unless-stopped
depends_on:
- rabbitmq
- db_middleware_writer
- db_middleware_reader
build: .
environment:
- DB_MIDDLEWARE_WRITER_HOST=garudadbmiddlewarewriter
- DB_MIDDLEWARE_WRITER_PORT=3001
- RABBITMQ_HOST=garuda_rabbitmq
- RABBITMQ_PORT=5672
stdin_open: true
tty: true
queue_worker_nasa:
container_name: garuda_queue_worker_nasa
image: acharyapranav/garuda:queue_worker_nasa-$PROJECT
depends_on:
- mongodb
- db_middleware_writer
- db_middleware_reader
- rabbitmq
build:
context: ./queue_worker_nasa
args:
- nasa_username=$NASA_USERNAME
- nasa_password=$NASA_PASSWORD
environment:
- DB_MIDDLEWARE_WRITER_HOST=garudadbmiddlewarewriter
- DB_MIDDLEWARE_WRITER_PORT=3001
- RABBITMQ_HOST=garuda_rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_QUEUE_NASA=offload_queue_nasa
restart: unless-stopped
stdin_open: true
tty: true
web_app:
container_name: garuda_web_app
image: acharyapranav/garuda:web_app-$PROJECT
restart: unless-stopped
build:
context: ./web_app
args:
- REACT_APP_API_GATEWAY_HOST=garuda.org
- REACT_APP_API_GATEWAY_PORT=$API_GATEWAY_PORT
depends_on:
- api_gateway
ports:
- 3000:80
environment:
- CHOKIDAR_USEPOLLING=true
stdin_open: true
tty: true
volumes:
db:
queue: