feat: один прод-compose со всеми моделями из готовых образов
This commit is contained in:
parent
c3fc1cec79
commit
a694702d8f
44 changed files with 1126 additions and 2075 deletions
|
|
@ -12,10 +12,10 @@ COPY modules.conf /etc/asterisk/modules.conf
|
|||
COPY rtp.conf.template /opt/lct-sip/rtp.conf.template
|
||||
COPY entrypoint.sh /usr/local/bin/lct-sip-entrypoint
|
||||
RUN chmod +x /usr/local/bin/lct-sip-entrypoint \
|
||||
&& mkdir -p /recordings /var/lib/lct-sip /tls \
|
||||
&& mkdir -p /recordings /var/lib/lct-sip \
|
||||
&& chown -R asterisk:asterisk /recordings /var/lib/lct-sip
|
||||
|
||||
EXPOSE 5060/udp 5060/tcp 5061/tcp 8088/tcp 10000-10099/udp
|
||||
EXPOSE 5060/udp 5060/tcp 8088/tcp 10000-10099/udp
|
||||
HEALTHCHECK --interval=10s --timeout=3s --retries=6 --start-period=15s \
|
||||
CMD asterisk -rx "core show uptime" >/dev/null 2>&1 || exit 1
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
set -eu
|
||||
|
||||
credentials=/var/lib/lct-sip/credentials.env
|
||||
mkdir -p /var/lib/lct-sip /recordings /tls
|
||||
mkdir -p /var/lib/lct-sip /recordings
|
||||
umask 077
|
||||
|
||||
override_6001=${SIP_6001_PASSWORD:-}
|
||||
|
|
@ -54,16 +54,6 @@ envsubst '${SIP_RTP_START} ${SIP_RTP_END}' \
|
|||
chmod 640 /etc/asterisk/rtp.conf
|
||||
chown root:asterisk /etc/asterisk/rtp.conf
|
||||
|
||||
if [ ! -s /tls/sip.crt ] || [ ! -s /tls/sip.key ]; then
|
||||
openssl req -x509 -nodes -newkey rsa:3072 -sha256 -days 365 \
|
||||
-keyout /tls/sip.key -out /tls/sip.crt \
|
||||
-subj '/CN=localhost/O=LCT local SIP training stand' \
|
||||
-addext 'subjectAltName=DNS:localhost,IP:127.0.0.1' \
|
||||
-addext 'extendedKeyUsage=serverAuth' 2>/dev/null
|
||||
fi
|
||||
chmod 640 /tls/sip.key
|
||||
chmod 644 /tls/sip.crt
|
||||
chown root:asterisk /tls/sip.key /tls/sip.crt
|
||||
chown -R asterisk:asterisk /recordings /var/lib/lct-sip
|
||||
|
||||
exec asterisk -f -U asterisk -G asterisk -vvv
|
||||
|
|
|
|||
|
|
@ -13,18 +13,7 @@ type=transport
|
|||
protocol=tcp
|
||||
bind=0.0.0.0:5060
|
||||
|
||||
[transport-tls]
|
||||
type=transport
|
||||
protocol=tls
|
||||
bind=0.0.0.0:5061
|
||||
cert_file=/tls/sip.crt
|
||||
priv_key_file=/tls/sip.key
|
||||
method=tlsv1_2
|
||||
verify_client=no
|
||||
verify_server=no
|
||||
allow_reload=yes
|
||||
|
||||
; TLS для браузера завершает тот же Nginx, что обслуживает АРМ. До Asterisk
|
||||
; Браузер ходит через /sip-ws того же Nginx, что обслуживает АРМ. До Asterisk
|
||||
; SIP signaling идёт WebSocket внутри изолированной Docker-сети.
|
||||
[transport-ws]
|
||||
type=transport
|
||||
|
|
|
|||
Loading…
Reference in a new issue