-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
110 lines (103 loc) · 2.29 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
version: "3.7"
services:
react-app-prod:
build:
context: ./frontend
dockerfile: Dockerfile.prod
#the line below just names the image and tags it
image: abhiroopdutta/etyres:react-dev-latest
container_name: react-app
ports:
- "3000:80"
environment:
TZ: "Asia/Kolkata"
profiles: ["prod"]
flask-api-prod:
build:
context: ./backend
dockerfile: Dockerfile
command: gunicorn --bind 0.0.0.0:5000 app:app
image: abhiroopdutta/etyres:flask-dev-latest
container_name: flask-api
ports:
- "5000:5000"
environment:
MONGODB_HOST: mongodb
TZ: "Asia/Kolkata"
depends_on:
- mongodb-prod
volumes:
- flaskproddata:/app/tempdata
profiles: ["prod"]
mongodb-prod:
image: mongo:6
container_name: mongodb
environment:
MONGODB_DATA_DIR: /data/db
TZ: "Asia/Kolkata"
ports:
- 27017:27017
# - 27018:27018
# - 27019:27019
volumes:
- mongoproddata:/data/db
- mongoprodconfig:/data/configdb
profiles: ["prod"]
react-app:
build:
context: ./frontend
dockerfile: Dockerfile
image: abhiroopdutta/etyres:react-dev
container_name: react-app
ports:
- "3000:3000"
volumes:
- ./frontend/src:/app/src
environment:
TZ: "Asia/Kolkata"
profiles: ["dev"]
flask-api:
build:
context: ./backend
dockerfile: Dockerfile
image: abhiroopdutta/etyres:flask-dev
command: gunicorn --reload --bind 0.0.0.0:5000 app:app
container_name: flask-api
ports:
- "8000:5000"
environment:
MONGODB_HOST: mongodb
TZ: "Asia/Kolkata"
volumes:
- ./backend:/app
- flaskdevdata:/app/tempdata
depends_on:
- mongodb
profiles: ["dev"]
mongodb:
image: mongo:6
container_name: mongodb
environment:
MONGODB_DATA_DIR: /data/db
TZ: "Asia/Kolkata"
ports:
- 27017:27017
# - 27018:27018
# - 27019:27019
volumes:
- mongodevdata:/data/db
- mongodevconfig:/data/configdb
profiles: ["dev"]
volumes:
flaskproddata:
driver: local
flaskdevdata:
driver: local
mongoproddata:
driver: local
mongoprodconfig:
driver: local
mongodevdata:
driver: local
mongodevconfig:
driver: local