-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
72 lines (66 loc) · 1.85 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
version: '2.3'
services:
asterisk:
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_conf:/srv # Persistent storage
- ./pulse:/run/pulse:rshared # Use host audio
- /etc/localtime:/etc/localtime:ro # Use host timezone
deploy:
mode: replicated
replicas: 3
networks:
local:
aliases:
- asterisk.local
kamailio_dispatcher:
depends_on:
- db
- asterisk
build:
context: ${PWD}/kamailio
dockerfile: Dockerfile
ports:
- "5060:5060/udp"
- "5060:5060/tcp"
restart: always
networks:
local:
aliases:
- kamailio_dispatcher.local
db:
image: mysql:5.7
volumes:
- /tmp/dbdata:/var/lib/mysql
- ./containers/mysql/resources:/docker-entrypoint-initdb.d/
ports:
- "3306"
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_USER=kamailio
- MYSQL_PASSWORD=kamailiorw
- MYSQL_DATABASE=kamailio
healthcheck:
test: mysql --user=root -e "select * from mysql.user"
timeout: 45s
retries: 5
networks:
local:
aliases:
- db.local
networks:
local:
volumes:
asterisk_conf:
asterisk_spool:
tele_conf: