forked from rodrigobotti/rs-ec-2021-circuit-breaker
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdocker-compose.yml
67 lines (58 loc) · 1.04 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
version: '3'
x-client-app: &client-app
build: .
command: 'npm run start:client'
environment:
- SERVICE_NAME=backend-client
- PORT=3000
- REDIS_HOST=redis
- REDIS_PORT=6379
- SERVER_URL=http://backend-server:3000/api
expose:
- 3000
networks:
- example-2
depends_on:
- redis
deploy:
resources:
limits:
cpus: '0.5'
memory: 128M
services:
backend-client-node-1:
<<: *client-app
ports:
- 3001:3000
backend-client-node-2:
<<: *client-app
ports:
- 3002:3000
backend-client-node-3:
<<: *client-app
ports:
- 3003:3000
backend-server:
build: .
command: 'npm run start:server'
environment:
- SERVICE_NAME=backend-service
- PORT=3000
expose:
- 3000
networks:
- example-2
deploy:
resources:
limits:
cpus: '0.5'
memory: 128M
redis:
image: redis:alpine
hostname: redis
ports:
- "6379:6379"
networks:
- example-2
networks:
example-2: