-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
119 lines (104 loc) · 2.94 KB
/
docker-compose.dev.yaml
File metadata and controls
119 lines (104 loc) · 2.94 KB
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
version: '3.8'
services:
# NATS Message Broker
nats_broker:
image: nats:alpine3.22
container_name: fs_agent_nats
command: "-js -sd /data -m 8222"
ports:
- "${NATS_PORT}:4222"
- "${NATS_MONITOR_PORT}:8222"
volumes:
- .docker-store/nats-dev:/data
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8222/healthz"]
interval: 10s
timeout: 5s
retries: 5
networks:
- fs_agent
# PostgreSQL Database (for Kamailio)
postgres:
image: postgres:15-alpine
container_name: fs_agent_postgres
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "${DB_PORT}:5432"
networks:
- fs_agent
volumes:
- ./.docker-store/postgres:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
interval: 10s
timeout: 5s
retries: 5
# Kamailio SIP Proxy
kamailio:
image: ghcr.io/kamailio/kamailio:6.0.4-bullseye
container_name: fs_agent_kamailio
ports:
- "5060:5060/udp"
- "5060:5060/tcp"
- "8082:8080/tcp"
- "8443:8443/tcp"
networks:
- fs_agent
environment:
- DBHOST=postgres
- DBPORT=5432
- DBNAME=${DB_NAME}
- DBRWUSER=${DB_USER}
- DBRWPW=${DB_PASSWORD}
- FS_HOST=${FS_IP}
- FS_PORT=5060
volumes:
- ./.docker-store/kamailio:/etc/kamailio
depends_on:
- postgres
restart: unless-stopped
command: ["-m", "64", "-M", "8"]
# FreeSWITCH
freeswitch:
image: freeswitch-events-agent:latest
container_name: fs_agent_freeswitch
build:
context: .
dockerfile: Dockerfile.freeswitch
privileged: true
depends_on:
- nats_broker
- kamailio
ports:
- "${FS_SIP_PORT}:5060/tcp"
- "${FS_SIP_PORT}:5060/udp"
- "5080:5080/tcp" # SIP TCP (alternative)
- "5080:5080/udp" # SIP UDP (alternative)
- "5081:5081/tcp" # SIP TLS TCP (alternative)
- "5081:5081/udp" # SIP TLS UDP (alternative)
- "5070:5070/tcp" # SIP WS
- "5070:5070/udp" # SIP WS UDP
- "5066:5066/tcp" # WS
- "64000-64100:64000-64100/udp" # RTP Media Ports
- "7443:7443" # API/WS or HTTPS port if used
networks:
- fs_agent
environment:
- MOD_AUDIO_FORK_SUBPROTOCOL_NAME=audio.drachtio.org
- DRACHTIO_HOST=${FS_IP}
- NATS_HOST=fs_agent_nats
- NATS_PORT=4222
- AGENT_NODE_ID=agent-node-1
volumes:
- ./.docker-store/freeswitch/sounds:/usr/local/freeswitch/sounds
- ./.docker-store/freeswitch/recordings:/usr/local/freeswitch/recordings
- ./autoload_configs/mod_event_agent.conf.xml:/usr/local/freeswitch/conf/autoload_configs/mod_event_agent.conf.xml:ro
- ./:/workspace
restart: unless-stopped
networks:
fs_agent:
driver: bridge