mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Update Dockerfile for FreeSWITCH 1.8, install from deb and latest
cgr-engine syntax.
This commit is contained in:
committed by
Dan Christian Bogos
parent
be06504663
commit
96a1f598ad
@@ -1,27 +1,35 @@
|
||||
FROM debian:latest
|
||||
MAINTAINER Radu Fericean, rif@cgrates.org
|
||||
RUN apt-get -y update
|
||||
LABEL maintainer="Radu Fericean, rif@cgrates.org, Gavin Henry, ghenry@surevoip.co.uk"
|
||||
RUN apt-get update && apt-get install -y gnupg2 wget apt-utils ngrep vim
|
||||
|
||||
# set mysql password
|
||||
RUN echo 'mysql-server mysql-server/root_password password CGRateS.org' | debconf-set-selections && echo 'mysql-server mysql-server/root_password_again password CGRateS.org' | debconf-set-selections
|
||||
|
||||
|
||||
# add freeswitch gpg key
|
||||
RUN gpg --keyserver pool.sks-keyservers.net --recv-key D76EDC7725E010CF && gpg -a --export D76EDC7725E010CF | apt-key add -
|
||||
RUN wget -O - https://files.freeswitch.org/repo/deb/freeswitch-1.8/fsstretch-archive-keyring.asc | apt-key add -
|
||||
|
||||
# add freeswitch apt repo
|
||||
RUN echo 'deb http://files.freeswitch.org/repo/deb/debian/ jessie main' > /etc/apt/sources.list.d/freeswitch.list
|
||||
RUN echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.8/ stretch main" > /etc/apt/sources.list.d/freeswitch.list
|
||||
|
||||
# install dependencies
|
||||
RUN apt-get update && apt-get -y install redis-server mysql-server python-pycurl python-mysqldb postgresql postgresql-client sudo wget git freeswitch-meta-vanilla
|
||||
|
||||
####
|
||||
# Re-enable this once the CGRateS repo is live - GH.
|
||||
#
|
||||
# add cgrates apt-key
|
||||
RUN wget -qO- http://apt.itsyscom.com/conf/cgrates.gpg.key | apt-key add -
|
||||
#RUN wget -qO- http://apt.itsyscom.com/conf/cgrates.gpg.key | apt-key add -
|
||||
|
||||
# add cgrates repo
|
||||
RUN cd /etc/apt/sources.list.d/; wget -q http://apt.itsyscom.com/conf/cgrates.apt.list
|
||||
#RUN cd /etc/apt/sources.list.d/; wget -q http://apt.itsyscom.com/conf/cgrates.apt.list
|
||||
|
||||
# install cgrates
|
||||
RUN apt-get update && apt-get -y install cgrates
|
||||
#RUN apt-get update && apt-get -y install cgrates
|
||||
|
||||
# CGRateS
|
||||
RUN wget -O /tmp/cgrates.deb http://www.cgrates.org/tmp_pkg/cgrates_0.9.1~rc8_amd64.deb
|
||||
RUN apt install /tmp/cgrates.deb
|
||||
RUN rm /tmp/cgrates.deb
|
||||
|
||||
# cleanup
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
@@ -8,4 +8,6 @@ From the project root:
|
||||
docker build -t cgrates data/docker/prod
|
||||
# create the container
|
||||
docker run --rm -itv `pwd`:/root/code --name cgr cgrates
|
||||
# If running on local machine, do this to expose agent for /pprof:
|
||||
docker run --rm -itv `pwd`:/root/code -p 127.0.0.1:2080:2080/tcp --name cgr cgrates
|
||||
```
|
||||
|
||||
@@ -6,6 +6,16 @@ cd /usr/share/cgrates/storage/mysql && ./setup_cgr_db.sh root CGRateS.org
|
||||
cd /usr/share/cgrates/storage/postgres && ./setup_cgr_db.sh
|
||||
|
||||
/usr/share/cgrates/tutorials/fs_evsock/freeswitch/etc/init.d/freeswitch start
|
||||
|
||||
# Docker doesn't have syslog. Let others modify this to send out logs if needed
|
||||
sed -i 's/config_dir/config_path/g' /usr/share/cgrates/tutorials/fs_evsock/cgrates/etc/init.d/cgrates
|
||||
sed -i 's/\/etc\/cgrates/\/etc\/cgrates -httprof_path=\/pprof -logger=*stdout/g' /usr/share/cgrates/tutorials/fs_evsock/cgrates/etc/init.d/cgrates
|
||||
|
||||
# Get our data ready
|
||||
/usr/bin/cgr-migrator -migrate=*set_versions -config_path=/usr/share/cgrates/tutorials/fs_evsock/cgrates/etc/cgrates/
|
||||
|
||||
# Let FreeSWITCH start up
|
||||
sleep 5
|
||||
/usr/share/cgrates/tutorials/fs_evsock/cgrates/etc/init.d/cgrates start
|
||||
|
||||
bash --rcfile /root/.bashrc
|
||||
|
||||
Reference in New Issue
Block a user