-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
94 lines (88 loc) · 2.04 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
services:
mysql:
image: mysql
container_name: mysql
volumes:
- ./etc/mysql:/docker-entrypoint-initdb.d
- mysql_data:/var/lib/mysql
env_file:
- .env
healthcheck:
test: mysql -u ${MYSQL_USER} -p'${MYSQL_PASSWORD}' opensips -e 'SHOW TABLES LIKE "location"' 2>&1 | grep -q location
interval: 10s
timeout: 1s
retries: 5
start_period: 20s
networks:
local_network:
ipv4_address: ${MYSQL_IP}
opensips:
image: opensips/opensips:cp-all-tools
container_name: opensips
volumes:
- ./etc/opensips:/etc/opensips
ports:
- 5060:5060/udp
- 5060:5060/tcp
expose:
- 9060/tcp
env_file:
- .env
depends_on:
mysql:
condition: service_healthy
command:
- -p /etc/opensips/substenv.sh
networks:
local_network:
ipv4_address: ${OPENSIPS_IP}
control-panel:
build:
context: ./etc/opensips-cp/image
dockerfile_inline: FROM opensips/opensips-cp:latest
container_name: opensips-cp
env_file:
- .env
depends_on:
mysql:
condition: service_healthy
ports:
- 80:80
expose:
- 9060/tcp
volumes:
- ./etc/opensips-cp/docker-entrypoint.d:/docker-entrypoint.d
networks:
local_network:
ipv4_address: ${CP_IP}
rtpproxy:
image: sippylabs/rtpproxy
container_name: rtpproxy
env_file:
- .env
ports:
- "${MINPORT}-${MAXPORT}:${MINPORT}-${MAXPORT}/udp"
networks:
local_network:
ipv4_address: ${RTPPROXY_IP}
command: -s udp:${RTPPROXY_IP}:${RTPPROXY_PORT} -l ${RTPPROXY_IP} -m ${MINPORT} -M ${MAXPORT} -A ${HOST_IP}
rtpengine:
image: drachtio/rtpengine
container_name: rtpengine
environment:
- LOCAL_IP=${RTPENGINE_IP}
ulimits:
nproc: 1024
nofile:
soft: 4096
hard: 8192
networks:
local_network:
ipv4_address: ${RTPENGINE_IP}
volumes:
mysql_data:
networks:
local_network:
ipam:
config:
- subnet: ${NETWORK}