-
-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathdocker-compose.yml
183 lines (174 loc) · 5.49 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
#
# Copyright 2019-2022 Signal Messenger, LLC
# SPDX-License-Identifier: AGPL-3.0-only
#
# This Docker Compose file is used for running and testing a local deployment of the Calling Service.
#
# Prerequisites
# If you plan to actually connect and carry out a group call, you need to do the following in this file:
# - Set the CALLING_AUTH_KEY to a valid key unless you have removed its use from the code.
# - Set the calling-backend IPs to that of your local host
#
# To use:
# $ docker compose build
# $ docker compose up
#
# Now you can access the Calling Service.
#
# Option 1:
# 1) Point a tool like Postman to http://<host ip>:8090/v2/conference/participants
# 2) Be sure to set the Basic Auth Password to a valid signature token
# - You can also modify the code to ignore the auth check
# 3) Repeat for the other APIs
#
# Option 2:
# 1) Go to this URL to find the ngrok http address that points to your frontend: http://localhost:4040
# 2) Modify Desktop code to ignore TLS certificate errors. Add this line in calling.ts, CallingClass.initialize:
# process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
#
# Or, if you are running from source, you can do this:
# $ NODE_TLS_REJECT_UNAUTHORIZED=0 yarn start
#
# 3) Build the Desktop with `yarn generate` (assuming you already did the `yarn install` parts before.
# 4) Run the Desktop client.
# 5) In the client's Developer Tools console, enter this:
# window.Signal.Services.calling.sfuUrl = "<ngrok http address>";
# Then press Enter.
# 6) Now when your client connects to a group call, it should be using this environment!
#
# Option 3:
# TBD: Use the gctc (Group Call Test Client)
#
version: '3.8'
services:
dynamodb:
image: "amazon/dynamodb-local:latest"
container_name: dynamodb
ulimits:
nproc: 65535
nofile:
soft: 65535
hard: 65535
ports:
- "8000:8000"
working_dir: /home/dynamodblocal
command:
# Use -inMemory for performance and because the data is temporary.
-jar DynamoDBLocal.jar -inMemory
# Sets up the table for the Calling Frontend. This sets up a table here:
# region: us-west-1
# table name: Conferences
bootstrap:
depends_on:
- dynamodb
build: ./docker/bootstrap
container_name: bootstrap
environment:
AWS_ACCESS_KEY_ID: 'DummyAccessKey'
AWS_SECRET_ACCESS_KEY: 'DummyPassword'
calling-frontend:
depends_on:
- dynamodb
- bootstrap
- calling-backend
build:
args:
rust_flags: -Ctarget-cpu=native
dockerfile: frontend/Dockerfile
context: .
container_name: calling-frontend
ulimits:
nproc: 65535
nofile:
soft: 65535
hard: 65535
deploy:
resources:
limits:
cpus: '2.0'
memory: 5G
ports:
# Note: The frontend can be accessed via port 8090 externally.
- "8090:8080"
- "8100:8100"
entrypoint: calling_frontend
command:
- --region
- "us-west1"
- --authentication-key
# Set the auth key to the one you want, but do not commit with it!
- "deaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddeaddead"
- --zkparams
- "AMJqvmQRYwEGlm0MSy6QFPIAvgOVsqRASNX1meQyCOYHJFqxO8lITPkow5kmhPrsNbu9JhVfKFwesVSKhdZaqQko3IZlJZMqP7DDw0DgTWpdnYzSt0XBWT50DM1cw1nCUXXBZUiijdaFs+JRlTKdh54M7sf43pFxyMHlS3URH50LOeR8jVQKaUHi1bDP2GR9ZXp3Ot9Fsp0pM4D/vjL5PwoOUuzNNdpIqUSFhKVrtazwuHNn9ecHMsFsN0QPzByiDA8nhKcGpdzyWUvGjEDBvpKkBtqjo8QuXWjyS3jSl2oJ/Z4Fh3o2N1YfD2aWV/K88o+TN2/j2/k+KbaIZgmiWwppLU+SYGwthxdDfZgnbaaGT/vMYX9P5JlUWSuP3xIxDzPzxBEFho67BP0Pvux+0a5nEOEVEpfRSs61MMvwNXEKZtzkO0QFbOrFYrPntyb7ToqNi66OQNyTfl/J7kqFZg2MTm3CKjHTAIvVMFAGCIamsrT9sWXOtuNeMS94xazxDA=="
- --version
- "1"
- --max-clients-per-call
- "50"
- --cleanup-interval-ms
- "10000"
- --regional-url-template
- "http://calling-frontend:8080"
- --calling-server-url
- "http://calling-backend:8080"
- --storage-table
- "Rooms"
- --storage-endpoint
- "http://dynamodb:8000"
- --storage-region
- "us-west-1"
- --internal-api-port
- "8100"
calling-backend:
build:
args:
rust_flags: -Ctarget-cpu=native
dockerfile: backend/Dockerfile
context: .
container_name: calling-backend
ulimits:
nproc: 65535
nofile:
soft: 65535
hard: 65535
deploy:
resources:
limits:
cpus: '4.0'
memory: 5G
ports:
- "8080:8080"
- "9900:9900"
- "10000:10000/udp"
entrypoint: calling_backend
command:
# Set these IPs to your host's IP if you need to access it externally.
- --ice-candidate-ip
- "127.0.0.1"
- --signaling-ip
- "127.0.0.1"
- --ice-candidate-port-tcp
- "9900"
- --inactivity-timeout-secs
- "60"
- --diagnostics-interval-secs
- "10"
- --approved-users-persistence-url
- "http://calling-frontend:8100/v1/call-link-approvals"
- --remove-call-records-base-url
- "http://calling-frontend:8100/v2/conference"
# Go here on the host to find out the ngrok tunnel URL: http://localhost:4040
ngrok-frontend:
depends_on:
- calling-frontend
image: ngrok/ngrok:latest
ports:
- 4040:4040
# Optional: Set your ngrok auth token here to avoid timeouts and rate limits.
#environment:
# - NGROK_AUTHTOKEN=
command:
- "http"
- "calling-frontend:8080"
networks:
default:
name: test-network