-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (56 loc) · 1.28 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
version: '3'
networks:
scc311coursework:
services:
server1:
container_name: server1
image: harbor.scc.lancs.ac.uk/$USERNAME/server:latest
restart: unless-stopped
depends_on: [redis]
hostname: server1:8080
environment:
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
build:
context: server
networks:
- scc311coursework
ports:
- 8080:8080
server2:
container_name: server2
image: harbor.scc.lancs.ac.uk/$USERNAME/server:latest
restart: unless-stopped
depends_on: [redis]
hostname: server2:8080
environment:
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
build:
context: server
networks:
- scc311coursework
ports:
- 8081:8080
load-balancer:
container_name: load-balancer
image: harbor.scc.lancs.ac.uk/$USERNAME/load-balancer:latest
restart: unless-stopped
depends_on: [redis, server1, server2]
environment:
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
build:
context: load-balancer
networks:
- scc311coursework
ports:
- 9090:8080
redis:
container_name: redis
image: redis:5.0.6
restart: unless-stopped
networks:
- scc311coursework
ports:
- 6379:6379