-
Notifications
You must be signed in to change notification settings - Fork 22
/
docker-compose.yml
154 lines (144 loc) · 3.6 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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# ----------------------------------------------------------------------
# Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
# The Universal Permissive License (UPL), Version 1.0
# ----------------------------------------------------------------------
version: "3"
services:
# subsystem router configuration (glue)
router:
image: traefik:v2.5
container_name: router
command:
# - --accesslog
- --api.insecure=true
- --entrypoints.http.address=:80
- --providers.file.directory=/config
environment:
- WEB_PATH_PREFIX=/
- SOCKET_PATH_PREFIX=/ws
- PLAYER_ADDRESS=player:8080
- MATCHMAKER_ADDRESS=matchmaker:3000
# enable proxy for testing
- PROXY_ENABLE=true
- PROXY_ADDRESS=pod-proxy:8080
- PROXY_PATH_PREFIX=/proxy
- PROXY_AUTH_USERS=test:$$apr1$$fyf6DNyt$$oUgxHXVK5iD1b6U/zLTrr. # test/local
ports:
- 80:80
- 8080:8080
volumes:
- ./src/router/config/traefik.yml:/config/traefik.yml
- ./src/router/config/pod-proxy.yml:/config/pod-proxy.yml
networks:
- web
# forwarding proxy layer
podproxy:
image: podproxy
build: ./src/proxy
container_name: proxy
restart: always
volumes:
- ./src/proxy/nginx/default.conf.tmpl:/etc/nginx/conf.d/default.conf.tmpl
networks:
- web
- stream
# web
player:
image: player
build: ./src/player
container_name: player
restart: always
volumes:
- ./src/player/web:/usr/share/nginx/html
- ./src/player/nginx/default.conf:/etc/nginx/conf.d/default.conf
networks:
- web
# cirrus
signalserver:
image: signalserver
build: ./src/signalserver
container_name: signalserver
restart: always
ports:
- 4000:3000 # http & websocket (client is matchmaker)
- 4888:8888 # streamer connections (probably noop)
- 4900:9000 # metrics
volumes:
- ./src/signalserver:/app
entrypoint: node wrapper.js
command:
- --HttpPort=3000
- --StreamerPort=8888
- --UseHTTPS=0
- --UseMatchmaker=true
- --MatchmakerAddress=matchmaker
- --MatchmakerPort=9999
- --rtcConfigSvc=http://turn-api:3000
- --metricsPort=9000
depends_on:
- matchmaker
networks:
- stream
# cirrus
matchmaker:
image: matchmaker
build: ./src/matchmaker
container_name: matchmaker
restart: always
environment:
- DEBUG=true
- STREAM_SERVICE_NAME=signalserver
ports:
- 3000:3000 # http & client websocket
- 3900:9000 # metrics
volumes:
- ./src/matchmaker:/app
entrypoint: node wrapper.js
command:
- --HttpPort=3000
- --MatchmakerPort=9999
- --UseHTTPS=0
- --metricsPort=9000
networks:
- stream
- web
# start turn, even though it won't do much good locally
turn:
image: turn
build: './src/turn'
container_name: turn
restart: always
environment:
- TURN_USER=foo
- TURN_PASS=bar
ports:
- 3478:3478
networks:
- turn
# turn api
turn-api:
image: turn-api
build: ./src/turn-api
container_name: turn-api
restart: always
volumes:
- ./src/turn-api:/app
- ./src/turn-api/endpoints.example.json:/endpoints.json
environment:
- TURN_USER=foo
- TURN_PASS=bar
- ENDPOINT_FILE=/endpoints.json
ports:
- 3480:3000
networks:
- turn
# tools container (build only)
tools:
image: kubetools
build: ./src/kubetools
container_name: kubetools
restart: "no"
networks:
web:
stream:
turn: