-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
157 lines (147 loc) · 4.62 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
version: '3'
services:
asterisk:
image: andrius/asterisk:alpine_glibc-18.x
volumes:
- tele_conf_base:/etc/asterisk/ # Persistent storage
- tele_spool_base:/var/spool/asterisk/
- /etc/localtime:/etc/localtime:ro # Use host timezone
ports:
# - "5061:5061/tcp"
# - "5062:5062/udp"
- "10030-10039:10030-10039/udp"
deploy:
mode: replicated
replicas: 1
networks:
local:
aliases:
- sip.oncx.cf
asterisk1:
image: fgst/asterisk:full
cap_add:
- sys_ptrace # Only here to help testing
- net_admin # Allow NFT, used by AutoBan
- net_raw # Allow NFT, used by AutoBan
environment:
- SYSLOG_LEVEL=${SYSLOG_LEVEL-4} # Logging
- HOSTNAME=${TELE_SRV-tele}.${DOMAIN-docker.localhost}
- PULSE_SERVER=unix:/run/pulse/socket # Use host audio
- PULSE_COOKIE=/run/pulse/cookie # Use host audio
- WEBSMSD_PORT=${WEBSMSD_PORT-80} # WEBSMSD internal port
volumes:
- tele_conf1:/srv # Persistent storage
- ./pulse1:/run/pulse:rshared # Use host audio
- /etc/localtime:/etc/localtime:ro # Use host timezone
ports:
# - "5060:5060/udp"
- "10000-10009:10000-10009/udp"
deploy:
mode: replicated
replicas: 1
networks:
local:
aliases:
- cs1.oncx.cf
asterisk2:
image: fgst/asterisk:base
cap_add:
- sys_ptrace # Only here to help testing
- net_admin # Allow NFT, used by AutoBan
- net_raw # Allow NFT, used by AutoBan
environment:
- SYSLOG_LEVEL=${SYSLOG_LEVEL-4} # Logging
- HOSTNAME=${TELE_SRV-tele}.${DOMAIN-docker.localhost}
- PULSE_SERVER=unix:/run/pulse/socket # Use host audio
- PULSE_COOKIE=/run/pulse/cookie # Use host audio
- WEBSMSD_PORT=${WEBSMSD_PORT-80} # WEBSMSD internal port
volumes:
- tele_conf2:/srv # Persistent storage
- ./pulse2:/run/pulse:rshared # Use host audio
- /etc/localtime:/etc/localtime:ro # Use host timezone
ports:
- "10010-10019:10010-10019/udp"
deploy:
mode: replicated
replicas: 1
networks:
local:
aliases:
- cs2.oncx.cf
asterisk3:
image: fgst/asterisk:base
cap_add:
- sys_ptrace # Only here to help testing
- net_admin # Allow NFT, used by AutoBan
- net_raw # Allow NFT, used by AutoBan
environment:
- SYSLOG_LEVEL=${SYSLOG_LEVEL-4} # Logging
- HOSTNAME=${TELE_SRV-tele}.${DOMAIN-docker.localhost}
- PULSE_SERVER=unix:/run/pulse/socket # Use host audio
- PULSE_COOKIE=/run/pulse/cookie # Use host audio
- WEBSMSD_PORT=${WEBSMSD_PORT-80} # WEBSMSD internal port
volumes:
- tele_conf3:/srv # Persistent storage
- ./pulse3:/run/pulse:rshared # Use host audio
- /etc/localtime:/etc/localtime:ro # Use host timezone
ports:
- "10020-10029:10020-10029/udp"
deploy:
mode: replicated
replicas: 1
networks:
local:
aliases:
- cs3.oncx.cf
kamailio_dispatcher:
depends_on:
- db
build:
context: ${PWD}/kamailio
dockerfile: Dockerfile
volumes:
- dispatcher_conf_base:/etc/kamailio/
environment:
- PUBLIC_IP_ADDRESS=42.116.254.236
ports:
# - "5080:5080/udp"
# - "5061:5061/udp"
- "5060:5060/udp"
# - "5060:5060/tcp"
# - "10030-10039:10030-10039/udp"
restart: always
networks:
local:
aliases:
- oncx.cf
db:
image: mysql:5.7
volumes:
- /tmp/dbdata:/var/lib/mysql
- ./containers/mysql/resources:/docker-entrypoint-initdb.d/
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_USER=kamailio
- MYSQL_PASSWORD=kamailiorw
- MYSQL_DATABASE=kamailio
ports:
- "3306"
healthcheck:
test: mysql --user=root -e "select * from mysql.user"
timeout: 45s
retries: 5
networks:
local:
aliases:
- db.local
networks:
local:
volumes:
dispatcher_conf_base:
asterisk_conf:
asterisk_spool:
tele_conf_base:
tele_spool_base:
tele_conf1:
tele_conf2:
tele_conf3: