generated from delftdata/wdm-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
99 lines (87 loc) · 2.27 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
version: "3"
services:
gateway:
image: nginx:latest
volumes:
- ./gateway_nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "8000:80"
order-db:
container_name: order-db
image: mongo
command: mongod --port 27018
logging:
driver: "none"
volumes:
- ./data:/data/db
ports:
- "27018:27018"
order-service:
build: ./order
image: order:latest
command: gunicorn -b 0.0.0.0:5000 app:app
env_file:
- env/order_mongo.env
# order-db:
# image: redis:latesta
# command: redis-server --requirepass redis --maxmemory 512mb
stock-service:
build: ./stock
image: stock:latest
command: gunicorn -b 0.0.0.0:5000 app:app
env_file:
- env/stock_redis.env
stock-db:
image: redis:latest
logging:
driver: "none"
command: redis-server --requirepass redis --maxmemory 512mb
payment-service0:
build: ./payment
image: payment:latest
expose:
- "5000"
command: gunicorn --worker-class=gevent --worker-connections=1000 -b 0.0.0.0:5000 app:app # -k gevent --worker-connections 100 (i dont know why this not working) could also add --threads 12
environment:
- OTHER_NODE=http://payment-service1
- PORT=27017
- GATEWAY_URL=mongodb://payment-db0:27017/db
- REPLICATION_NUMBER=0
- FLASK_ENV=development
payment-service1:
build: ./payment
image: payment:latest
expose:
- "5000"
command: gunicorn --worker-class=gevent --worker-connections=1000 -b 0.0.0.0:5000 app:app
# env_file:
# - env/payment_mongo.env
environment:
- OTHER_NODE=http://payment-service0
- PORT=27019
- GATEWAY_URL=mongodb://payment-db1:27019/db
- REPLICATION_NUMBER=1
- FLASK_ENV=development
coordinator-service:
build: ./coordinator
image: coordinator:latest
command: gunicorn -b 0.0.0.0:5000 app:app
payment-db0:
container_name: payment-db0
image: mongo
logging:
driver: "none"
ports:
- "27017:27017"
volumes:
- ./mongodb_data_container:/data/db
payment-db1:
container_name: payment-db1
image: mongo
logging:
driver: "none"
ports:
- "27019:27019"
command: mongod --port 27019
volumes:
- ./mongodb_data_container:/data/db1