-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
106 lines (97 loc) · 2.03 KB
/
docker-compose.yml
File metadata and controls
106 lines (97 loc) · 2.03 KB
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
services:
user_app:
build:
context: ./services/user
dockerfile: Dockerfile
container_name: user_service
ports:
- 8000:8000
env_file:
- ./services/user/.env
volumes:
- ./services/user:/app
working_dir: /app
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
depends_on:
- user_db
- rabbitmq
deploy:
resources:
limits:
cpus: "0.5"
memory: 512M
order_app:
build:
context: ./services/order
dockerfile: Dockerfile
container_name: order_service
ports:
- 8001:8001
env_file:
- ./services/order/.env
volumes:
- ./services/order:/app
working_dir: /app
command: uvicorn main:app --host 0.0.0.0 --port 8001 --reload
depends_on:
- order_db
- rabbitmq
deploy:
resources:
limits:
cpus: "0.5"
memory: 512M
product_app:
build:
context: ./services/product
dockerfile: Dockerfile
container_name: product_service
ports:
- 8008:8008
env_file:
- ./services/product/.env
volumes:
- ./services/product:/app
- /app/node_modules
working_dir: /app
command: npm run dev
restart: always
depends_on:
- rabbitmq
user_db:
image: postgres:15
container_name: user_db
ports:
- 5432:5432
env_file:
- ./services/user/.env
volumes:
- ecom_user_db:/var/lib/postgresql/data
order_db:
image: postgres:15
container_name: order_db
ports:
- 5433:5432
env_file:
- ./services/order/.env
volumes:
- ecom_order_db:/var/lib/postgresql/data
rabbitmq:
image: rabbitmq:management
container_name: rabbitmq
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 5s
timeout: 10s
retries: 5
deploy:
resources:
limits:
cpus: "0.5"
memory: 256M
volumes:
ecom_user_db:
ecom_order_db: