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,6 +155,45 @@ upservice(){
wait_for_container $1
}
createdatabase(){
# DATABASE
if [[ $MARIADB_ACTIVATE == 1 && $MARIADB_LOCAL == 1 ]]
then
Title "DATABASE"
# CREATE BDD
if [[ $CAS_ACTIVATE == 1 && $CAS_LOCAL == 1 ]]
then
EchoVert ${KEYCLOAK_SERVICE_NAME^^}
$PODCOMPOSEBIN exec $MARIADB_SERVICE_NAME /envole/init.sh $KEYCLOAK_SERVICE_NAME
fi
if [[ $NINEGATE_ACTIVATE == 1 && $NINEGATE_LOCAL == 1 ]]
then
EchoVert ${NINEGATE_SERVICE_NAME^^}
$PODCOMPOSEBIN exec $MARIADB_SERVICE_NAME /envole/init.sh $NINEGATE_SERVICE_NAME
fi
if [[ $NINEBOARD_ACTIVATE == 1 && $NINEBOARD_LOCAL == 1 ]]
then
EchoVert ${NINEBOARD_SERVICE_NAME^^}
$PODCOMPOSEBIN exec $MARIADB_SERVICE_NAME /envole/init.sh $NINEBOARD_SERVICE_NAME
fi
if [[ $NEXTCLOUD_ACTIVATE == 1 && $NEXTCLOUD_LOCAL == 1 ]]
then
EchoVert ${NEXTCLOUD_SERVICE_NAME^^}
$PODCOMPOSEBIN exec $MARIADB_SERVICE_NAME /envole/init.sh $NEXTCLOUD_SERVICE_NAME
fi
if [[ $WORDPRESS_ACTIVATE == 1 && $WORDPRESS_LOCAL == 1 ]]
then
EchoVert ${WORDPRESS_SERVICE_NAME^^}
$PODCOMPOSEBIN exec $MARIADB_SERVICE_NAME /envole/init.sh $WORDPRESS_SERVICE_NAME
fi
fi
}
#===========================================================================================================================================
#== UP =====================================================================================================================================
#===========================================================================================================================================
@ -187,38 +225,7 @@ up(){
then
Title "MARIADB"
upservice $MARIADB_SERVICE_NAME
echo
# CREATE BDD
if [[ $CAS_ACTIVATE == 1 && $CAS_LOCAL == 1 ]]
then
EchoVert ${KEYCLOAK_SERVICE_NAME^^}
$PODCOMPOSEBIN exec $MARIADB_SERVICE_NAME /envole/init.sh $KEYCLOAK_SERVICE_NAME
fi
if [[ $NINEGATE_ACTIVATE == 1 && $NINEGATE_LOCAL == 1 ]]
then
EchoVert ${NINEGATE_SERVICE_NAME^^}
$PODCOMPOSEBIN exec $MARIADB_SERVICE_NAME /envole/init.sh $NINEGATE_SERVICE_NAME
fi
if [[ $NINEBOARD_ACTIVATE == 1 && $NINEBOARD_LOCAL == 1 ]]
then
EchoVert ${NINEBOARD_SERVICE_NAME^^}
$PODCOMPOSEBIN exec $MARIADB_SERVICE_NAME /envole/init.sh $NINEBOARD_SERVICE_NAME
fi
if [[ $NEXTCLOUD_ACTIVATE == 1 && $NEXTCLOUD_LOCAL == 1 ]]
then
EchoVert ${NEXTCLOUD_SERVICE_NAME^^}
$PODCOMPOSEBIN exec $MARIADB_SERVICE_NAME /envole/init.sh $NEXTCLOUD_SERVICE_NAME
fi
if [[ $WORDPRESS_ACTIVATE == 1 && $WORDPRESS_LOCAL == 1 ]]
then
EchoVert ${WORDPRESS_SERVICE_NAME^^}
$PODCOMPOSEBIN exec $MARIADB_SERVICE_NAME /envole/init.sh $WORDPRESS_SERVICE_NAME
fi
createdatabase
fi
# OPENLDAP
@ -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