-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
172 lines (154 loc) · 3.78 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
version: "3.8"
services:
postgres:
container_name: postgres
image: postgres
restart: always
environment:
POSTGRES_DB: ${PG_DB}
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
pgadmin:
container_name: pgadmin4
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
ports:
- "5050:80"
django-backend:
container_name: django-backend
build: ./django
volumes:
- ./django:/app
environment:
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]
depends_on:
- postgres
django-backend-1:
container_name: django-backend-1
build: ./django
volumes:
- ./django:/app
environment:
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]
depends_on:
- postgres
django-backend-2:
container_name: django-backend-2
build: ./django
volumes:
- ./django:/app
environment:
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]
depends_on:
- postgres
redis:
container_name: redis
image: redis:latest
restart: always
volumes:
- ./id-generator/config/redis.conf:/redis.conf
command: ["redis-server", "/redis.conf"]
id-generator:
container_name: id-generator
build: ./id-generator
volumes:
- ./id-generator:/app
command: ["python", "main.py"]
depends_on:
- redis
machine-learning:
container_name: machine-learning
build: ./machine-learning-api
volumes:
- ./machine-learning-api:/app
command: ["python", "app.py"]
depends_on:
- redis
frontend-react:
container_name: frontend-react
build: ./react
volumes:
- frontendVol:/app/build
command: ["npm", "start"]
mongo:
container_name: mongo
image: mongo
restart: always
volumes:
- mongodata:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: ${MG_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MG_PASSWORD}
depends_on:
- django-backend
mongo-express:
container_name: mongo-express
image: mongo-express
ports:
- "8081:8081"
environment:
ME_CONFIG_MONGODB_SERVER: ${MG_EXPRESS_SERVER}
ME_CONFIG_MONGODB_ADMINUSERNAME: ${MG_EXPRESS_ADMIN_USER}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${MG_EXPRESS_ADMIN_PASSWORD}
ME_CONFIG_MONGODB_ENABLE_ADMIN: 'true'
depends_on:
- mongo
tracking:
container_name: tracking
build: ./tracking
volumes:
- ./tracking:/app
command: ["pm2", "start", "pm2.json", "--no-daemon"]
depends_on:
- mongo
tracking-1:
container_name: tracking-1
build: ./tracking
volumes:
- ./tracking:/app
command: ["pm2", "start", "pm2.json", "--no-daemon"]
depends_on:
- mongo
tracking-2:
container_name: tracking-2
build: ./tracking
volumes:
- ./tracking:/app
command: ["pm2", "start", "pm2.json", "--no-daemon"]
depends_on:
- mongo
nginx-proxy:
container_name: nginx-proxy
restart: always
build: ./nginx
volumes:
- frontendVol:/var/www/fastfoodapp
ports:
- "80:80"
- "443:443"
depends_on:
- mongo
order-delivery-time-handler:
container_name: order-delivery-time-handler
build: ./order-delivery-time-handler
volumes:
- ./order-delivery-time-handler:/app
command: ["python", "main.py"]
depends_on:
- django-backend
networks:
default:
external:
name: fast-food-application
volumes:
pgdata:
mongodata:
frontendVol: