-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
143 lines (135 loc) · 3.65 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
# This docker-compose configuration is intended to be used for integration testing only.
#
# Note:
# Assumes postgres is running on the host machine.
# Postgres is not included in this docker-compose configuration
# because of the complexity of adding code to wait for postgres to start.
version: "3.9"
volumes:
workspace:
opensips_fifo:
services:
gateway-bootstrap:
build:
context: components/gateway
target: bootstrap
image: gateway:bootstrap
platform: linux/amd64
environment:
DATABASE_USERNAME: "postgres"
DATABASE_PASSWORD:
DATABASE_NAME:
DATABASE_HOST: "host.docker.internal"
DATABASE_PORT: 5432
extra_hosts:
- "host.docker.internal:host-gateway"
public_gateway:
build:
context: components/gateway
target: public_gateway
image: public_gateway:latest
platform: linux/amd64
environment:
DATABASE_URL: "postgres://postgres:@host.docker.internal:5432/opensips_public_gateway_test"
FIFO_NAME: /opensips/fifo/public_gateway
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD-SHELL", "nc -z -w 5 $$(hostname -i) 5060"]
interval: 10s
timeout: 5s
retries: 10
expose:
- "5060/udp"
- "5080/udp"
volumes:
- opensips_fifo:/opensips/fifo
client_gateway:
build:
context: components/gateway
target: client_gateway
image: client_gateway:latest
platform: linux/amd64
environment:
DATABASE_URL: "postgres://postgres:@host.docker.internal:5432/opensips_client_gateway_test"
FIFO_NAME: /opensips/fifo/client_gateway
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD-SHELL", "nc -z -w 5 $$(hostname -i) 5060"]
interval: 10s
timeout: 5s
retries: 10
expose:
- "5060/udp"
volumes:
- opensips_fifo:/opensips/fifo
media_proxy:
build:
context: components/media_proxy
image: media_proxy:latest
platform: linux/amd64
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD-SHELL", "nc -z -w 5 $$(hostname -i) 2224"]
interval: 10s
timeout: 5s
retries: 10
expose:
- "2223/udp"
freeswitch:
build:
context: components/freeswitch
image: freeswitch:latest
platform: linux/amd64
environment:
FS_EXTERNAL_RTP_IP: "13.250.230.15"
FS_ALTERNATIVE_RTP_IP: "18.141.245.230"
expose:
- "5060/udp"
- "5222/tcp"
- "5080/udp"
- "8021/tcp"
healthcheck:
test:
["CMD-SHELL", "fs_cli -p secret -x 'rayo status' | rayo_status_parser"]
interval: 10s
timeout: 5s
retries: 10
switch-app:
build:
context: components/app
image: switch-app:latest
platform: linux/amd64
environment:
AHN_CORE_HOST: freeswitch
CALL_PLATFORM_STUB_RESPONSES: "true"
AHN_CORE_HTTP_PORT: "8080"
AWS_DEFAULT_REGION: "ap-southeast-1"
healthcheck:
test:
[
"CMD-SHELL",
"wget --server-response --spider --quiet http://localhost:8080/health_checks 2>&1 | grep '200 OK' > /dev/null",
]
interval: 10s
timeout: 5s
retries: 10
expose:
- "8080/tcp"
testing:
build:
context: components/testing
image: testing:latest
command: sipp -sf /scenarios/uas.xml -trace_msg
environment:
DATABASE_HOST: host.docker.internal
DATABASE_PORT: 5432
DATABASE_USERNAME: postgres
FIFO_DIR: /opensips/fifo
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- workspace:/workspace
- opensips_fifo:/opensips/fifo