-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
80 lines (74 loc) · 1.69 KB
/
docker-compose.yaml
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
version: "3.9"
services:
backend:
container_name: backend
image: backend
build:
context: ./backend
dockerfile: Dockerfile
ports:
- 10000:5000
networks:
lab-network:
ipv4_address: 10.5.0.10
volumes:
- ./backend/db-dockercompose.json:/app/db.json:ro
api-server-1:
container_name: api-server-1
image: api-server
build:
context: ./apiserver
dockerfile: Dockerfile
ports:
- 5001:5000
networks:
lab-network:
ipv4_address: 10.5.0.11
api-server-2:
container_name: api-server-2
image: api-server
build:
context: ./apiserver
dockerfile: Dockerfile
ports:
- 5002:5000
networks:
lab-network:
ipv4_address: 10.5.0.12
nginx:
container_name: nginx
image: nginx-api-steering
build:
context: ./nginx
dockerfile: Dockerfile
secrets:
- nginx-crt
- nginx-key
ports:
# Clients access to published REST API
- 10080:80
# Admin access to NGINX Plus API and Dashboard
- 20080:8080
networks:
lab-network:
ipv4_address: 10.5.0.20
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/api.conf:/etc/nginx/conf.d/api.conf:ro
- ./nginx/steering.js:/etc/nginx/conf.d/steering.js:ro
- ./nginx/steering.conf-dockercompose:/etc/nginx/conf.d/steering.conf:ro
- /dev/null:/etc/nginx/conf.d/default.conf:ro
secrets:
nginx-crt:
name: nginx-crt
file: ${NGINX_CERT}
nginx-key:
name: nginx-key
file: ${NGINX_KEY}
networks:
lab-network:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/24
gateway: 10.5.0.1