This commit is contained in:
afornerot 2024-03-01 16:47:21 +01:00
parent 088095765f
commit 7fdd0f976b
3 changed files with 75 additions and 34 deletions

View File

@ -17,3 +17,4 @@ WIDNINEBOARD_URL=${NINEBOARD_URL}
ACTIVATE_WIDGENCONFIG=${GENCONFIG_ACTIVATE}
WIDGENCONFIG_URL=${GENCONFIG_URL}
INITPWDADMIN=${ADMIN_PASSWORD}

View File

@ -79,7 +79,6 @@ env() {
rm -rf ./tmp/.env.$1
mkdir -p ./tmp
Echo $1
cat ./env/.env >> ./tmp/.env.$1
if [[ -f ./env/.env.local ]]; then cat ./env/.env.local >> ./tmp/.env.$1; fi
if [[ -f ./env/.env.zapp.$1 ]]; then cat ./env/.env.zapp.$1 >> ./tmp/.env.$1; fi
@ -156,38 +155,11 @@ upservice(){
wait_for_container $1
}
#===========================================================================================================================================
#== UP =====================================================================================================================================
#===========================================================================================================================================
#1 = service to up if null all service
up(){
# Stop du ou des services
stop $1
# SERVICES
if [[ -z "$1" ]]
then
# NETWORK
if [[ "$RELEASE_SYSTEM" == "eole" ]]
then
Title "NETWORK"
EchoRouge "ATTENTION SOLUTION DE CONTOURNEMENT POUR LE POC"
EchoRouge "A résoudre si l'on souhaite mettre en production"
# On réinstall docker-ce car le reconf détruit le reseau docker, la reinstall de docker-ce rétablit le reseau
apt-get install docker-ce --reinstall
# ATTENTION A REVOIR car ouvre complétement le firewall
iptables -P INPUT ACCEPT
fi
# MARIADB
createdatabase(){
# DATABASE
if [[ $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
then
Title "MARIADB"
upservice $MARIADB_SERVICE_NAME
echo
Title "DATABASE"
# CREATE BDD
if [[ $CAS_ACTIVATE == 1 && $CAS_LOCAL == 1 ]]
@ -220,6 +192,41 @@ up(){
$PODCOMPOSEBIN exec $MARIADB_SERVICE_NAME /envole/init.sh $WORDPRESS_SERVICE_NAME
fi
fi
}
#===========================================================================================================================================
#== UP =====================================================================================================================================
#===========================================================================================================================================
#1 = service to up if null all service
up(){
# Stop du ou des services
stop $1
# SERVICES
if [[ -z "$1" ]]
then
# NETWORK
if [[ "$RELEASE_SYSTEM" == "eole" ]]
then
Title "NETWORK"
EchoRouge "ATTENTION SOLUTION DE CONTOURNEMENT POUR LE POC"
EchoRouge "A résoudre si l'on souhaite mettre en production"
# On réinstall docker-ce car le reconf détruit le reseau docker, la reinstall de docker-ce rétablit le reseau
apt-get install docker-ce --reinstall
# ATTENTION A REVOIR car ouvre complétement le firewall
iptables -P INPUT ACCEPT
fi
# MARIADB
if [[ $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
then
Title "MARIADB"
upservice $MARIADB_SERVICE_NAME
createdatabase
fi
# OPENLDAP
if [[ $LDAP_ACTIVATE == 1 && $LDAP_LOCAL == 1 ]]
@ -300,8 +307,9 @@ up(){
echo
fi
else
Title ${1^^}
env ${1}
createdatabase
Title ${1^^}
$PODCOMPOSEBIN up -d $1
fi
}
@ -462,6 +470,16 @@ then
env $2
EchoVert "Fichier tmp/.env.$1 regénéré"
fi
elif [[ $1 == "regen" ]]
then
if [[ -z $2 ]]
then
destroyall
up
else
destroy $2
up $2
fi
else
EchoRouge "Action possible ="
EchoRouge "envole.sh > UP de l'ensemble des services actifs"

22
misc/apache/envole.conf Normal file
View File

@ -0,0 +1,22 @@
ProxyPass /auth http://envole.local:8080/auth retry=0 keepalive=On
ProxyPassReverse /auth http://envole.local:8080/auth retry=0
ProxyPass /ninegate http://envole.local:9000/ninegate retry=0 keepalive=On
ProxyPassReverse /ninegate http://envole.local:9000/ninegate retry=0
ProxyPass /wssninegate ws://envole.local:9000/wssninegate retry=0 keepalive=On
ProxyPassReverse /wssninegate ws://envole.local:9000/wssninegate retry=0
ProxyPass /nextcloud http://envole.local:9001 retry=0 keepalive=On
ProxyPassReverse /nextcloud http://envole.local:9001 retry=0
ProxyPass /adminer http://envole.local:9100 retry=0 keepalive=On
ProxyPassReverse /adminer http://envole.local:9100 retry=0
ProxyPass /phpldapadmin http://envole.local:9101/phpldapadmin retry=0 keepalive=On
ProxyPassReverse /phpldapadmin http://envole.local:9101/phpldapadmin retry=0
ProxyPass /nineapache http://envole.local:9102 retry=0 keepalive=On
ProxyPassReverse /nineapache http://envole.local:9102 retry=0