-
Notifications
You must be signed in to change notification settings - Fork 60
/
docker-compose.yml
72 lines (66 loc) · 1.74 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
x-moq: &x-moq
volumes:
- ./dev/localhost.crt:/etc/tls/cert:ro
- ./dev/localhost.key:/etc/tls/key:ro
- certs:/etc/ssl/certs
depends_on:
install-certs:
condition: service_completed_successfully
services:
relay1:
<<: *x-moq
build:
context: .
dockerfile: Dockerfile
target: moq-relay
# This relay is the root, used to discover/announce origins.
command: --tls-cert /etc/tls/cert --tls-key /etc/tls/key --tls-disable-verify --cluster-node relay1 --cluster-root relay1 --dev
ports:
- "4443:443"
- "4443:443/udp"
relay2:
<<: *x-moq
build:
context: .
dockerfile: Dockerfile
target: moq-relay
# This relay is a follower, connecting to relay1 to discover/announce origins.
command: --tls-cert /etc/tls/cert --tls-key /etc/tls/key --tls-disable-verify --cluster-node relay2 --cluster-root relay1 --dev
depends_on:
- relay1
ports:
- "4444:443"
- "4444:443/udp"
karp:
<<: *x-moq
build:
context: .
dockerfile: Dockerfile
target: moq-karp
entrypoint: moq-bbb
command: --tls-disable-verify --path bbb --url https://relay1
depends_on:
- relay1
clock:
<<: *x-moq
build:
context: .
dockerfile: Dockerfile
target: moq-clock
# Using relay2 just to test clustering.
command: --tls-disable-verify --publish https://relay2
depends_on:
- relay2
install-certs:
image: golang:latest
working_dir: /work
command: go run filippo.io/mkcert -install
environment:
CAROOT: /work/caroot
volumes:
- ${CAROOT:-.}:/work/caroot
- certs:/etc/ssl/certs
- ./dev/go.mod:/work/go.mod:ro
- ./dev/go.sum:/work/go.sum:ro
volumes:
certs: