forked from doherty-labs/health-app-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
200 lines (198 loc) · 4.21 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
189
190
191
192
193
194
195
196
197
198
199
200
version: "3.9"
services:
customer-webapp:
restart: always
build:
context: .
dockerfile: infrastructure/customer-webapp/Dockerfile
extends:
file: base.yml
service: base
command: >
sh -c "yarn install && npm run dev"
depends_on:
- celery-worker
- flower
- rest-api
volumes:
- /usr/src/app/node_modules
- ./web-app/customer:/usr/src/app
networks:
- django
ports:
- "3000:3000"
staff-webapp:
restart: always
build:
context: .
dockerfile: infrastructure/staff-webapp/Dockerfile
extends:
file: base.yml
service: base
command: >
sh -c "yarn install && npm run dev"
depends_on:
- celery-worker
- flower
- rest-api
volumes:
- /usr/src/app/node_modules
- ./web-app/staff:/usr/src/app
networks:
- django
ports:
- "3001:3000"
internal-webapp:
restart: always
build:
context: .
dockerfile: infrastructure/internal-webapp/Dockerfile
extends:
file: base.yml
service: base
command: >
sh -c "yarn install && npm run dev"
depends_on:
- celery-worker
- flower
- rest-api
volumes:
- /usr/src/app/node_modules
- ./web-app/internal:/usr/src/app
networks:
- django
ports:
- "3002:3000"
flower:
restart: always
build:
context: .
dockerfile: infrastructure/celery-flower/Dockerfile
extends:
file: base.yml
service: base
volumes:
- ./api/django_project:/usr/src/app/django
depends_on:
- postgres
- redis
- pgadmin
- rabbitmq
- elastic
networks:
- django
ports:
- "5555:5555"
rest-api:
restart: always
build:
context: .
dockerfile: infrastructure/rest-api/Dockerfile
extends:
file: base.yml
service: base
depends_on:
- celery-worker
- flower
- rabbitmq
volumes:
- ./api/django_project:/usr/src/app/django
networks:
- django
ports:
- "8000:8000"
- "8069:8069"
celery-worker:
restart: always
build:
context: .
dockerfile: infrastructure/celery-worker/Dockerfile
extends:
file: base.yml
service: base
volumes:
- ./api/django_project:/usr/src/app/django
depends_on:
- postgres
- redis
- pgadmin
- rabbitmq
- elastic
networks:
- django
redis:
image: "redis:alpine"
networks:
- django
postgres:
container_name: postgres_container
image: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
- ./infrastructure/init_dev_db.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
networks:
- django
restart: unless-stopped
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: "False"
volumes:
- pgadmin:/var/lib/pgadmin
ports:
- "${PGADMIN_PORT:-5050}:80"
networks:
- django
restart: unless-stopped
depends_on:
- postgres
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:8.5.0
container_name: elasticsearch
environment:
- xpack.security.enabled=false
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
networks:
- django
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: "rabbitmq"
ports:
- 5672:5672
- 15672:15672
volumes:
- rabbitmq:/var/lib/rabbitmq/
- rabbitmq:/var/log/rabbitmq
networks:
- django
networks:
django:
driver: bridge
volumes:
postgres:
pgadmin:
elasticsearch-data:
rabbitmq: