-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (54 loc) · 1.26 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
version: "3"
services:
load-balancer:
build: ./load-balancer
ports:
- "${LOAD_BALANCER_SERVER_PORT}:${LOAD_BALANCER_SERVER_PORT}"
volumes:
- ./load-balancer:/usr/src/app
- /usr/src/app/node_modules
env_file:
- .env
depends_on:
- redis
- first-server
- second-server
- third-server
redis:
image: redis:latest
ports:
- 6379:6379
volumes:
- redis_data:/data
first-server:
build: ./server
ports:
- "${FIRST_SERVER_PORT}:${FIRST_SERVER_PORT}"
environment:
- PORT=${FIRST_SERVER_PORT}
- SERVER_NAME=${FIRST_SERVER_NAME}
volumes:
- ./server:/usr/src/app
- /usr/src/app/node_modules
second-server:
build: ./server
ports:
- "${SECOND_SERVER_PORT}:${SECOND_SERVER_PORT}"
environment:
- PORT=${SECOND_SERVER_PORT}
- SERVER_NAME=${SECOND_SERVER_NAME}
volumes:
- ./server:/usr/src/app
- /usr/src/app/node_modules
third-server:
build: ./server
ports:
- "${THIRD_SERVER_PORT}:${THIRD_SERVER_PORT}"
environment:
- PORT=${THIRD_SERVER_PORT}
- SERVER_NAME=${THIRD_SERVER_NAME}
volumes:
- ./server:/usr/src/app
- /usr/src/app/node_modules
volumes:
redis_data: