forked from SimplesIP/docker-pabx-app
bruno
1 year ago
9 changed files with 98 additions and 115 deletions
@ -0,0 +1,26 @@
|
||||
#!/bin/bash |
||||
|
||||
echo "---- Configurar PABX SIMPLES IP ----" |
||||
|
||||
if [[ -z $IP_HOST ]];then |
||||
echo "Nao definido variavel de ambiente" |
||||
exit; |
||||
fi |
||||
|
||||
NET_CONTAINER=$(ip route|awk 'NR==2 {print $1}'|awk -F / '{print $1"\/"$2}') |
||||
if [[ -z $NET_CONTAINER ]];then |
||||
echo "Nao definido variavel de ambiente" |
||||
exit; |
||||
fi |
||||
|
||||
sed -i "s/;\?externaddr=.*/externaddr=${IP_HOST}/g" /etc/asterisk/sip_general.conf |
||||
sed -i "s/;\?localnet=.*/localnet=${NET_CONTAINER}/g" /etc/asterisk/sip_general.conf |
||||
sed -i "s/;\?media_address=.*/media_address=${IP_HOST}/g" /etc/asterisk/sip_general.conf |
||||
|
||||
pid_asterisk=$(ps -aux|grep -E "\/usr\/sbin\/asterisk"|awk '{print $2}') |
||||
if [[ -z $pid_asterisk ]];then |
||||
exit; |
||||
fi |
||||
kill -9 $pid_asterisk |
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
#postgres:11.5 |
||||
FROM postgres@sha256:7ffb249ddc0510a5248a019a71710ee222c6204c7c0ccf07f19f2d6cf638f18a |
||||
|
||||
ENV LC_ALL=en_US.ISO-8859-1 |
||||
ENV LC_MESSAGES=en_US.ISO-8859-1 |
||||
ENV LC_MONETARY=en_US.ISO-8859-1 |
||||
ENV LC_NUMERIC=en_US.ISO-8859-1 |
||||
ENV LC_TIME=en_US.ISO-8859-1 |
||||
|
||||
RUN echo "en_US ISO-8859-1" > /etc/locale.gen |
||||
RUN locale-gen "en_US ISO-8859-1" |
||||
RUN export LC_ALL="en_US ISO-8859-1" |
||||
RUN update-locale |
||||
|
||||
COPY include_sql.sh /docker-entrypoint-initdb.d/ |
||||
RUN chmod 755 /docker-entrypoint-initdb.d/include_sql.sh |
||||
|
||||
EXPOSE 5432 |
||||
|
||||
COPY permission_pg_hba.sh / |
||||
RUN chmod 755 /permission_pg_hba.sh |
||||
RUN /permission_pg_hba.sh |
||||
|
@ -1,14 +0,0 @@
|
||||
|
||||
psql -U contacte -d pbx -f /base/schema/createSchema_1.sql |
||||
|
||||
psql -U contacte -d pbx -f /base/schema/putData.sql |
||||
|
||||
psql -U contacte -d pbx -f /base/schema/whatsapp.sql |
||||
|
||||
psql -U contacte -d pbx -f /base/sql/versao-1.7.11.3.sql |
||||
|
||||
psql -U contacte -d pbx -f /base/sql/versao-1.7.11.4.sql |
||||
|
||||
psql -U contacte -d pbx -f /base/sql/versao-1.7.11.5.sql |
||||
|
||||
psql -U contacte -d pbx -f /base/sql/versao-1.7.12.sql |
@ -1,5 +0,0 @@
|
||||
#!/bin/sh |
||||
|
||||
echo "host all all 192.168.115.0/24 password" >> /var/lib/postgresql/data/pg_hba.conf |
||||
echo "host all all 10.252.252.0/24 password" >> /var/lib/postgresql/data/pg_hba.conf |
||||
echo "host all all 177.67.197.146/32 password" >> /var/lib/postgresql/data/pg_hba.conf |
Loading…
Reference in new issue