nextcloud in alias redirect

This commit is contained in:
afornerot 2023-11-07 19:33:50 +01:00
parent 89dae7c4ea
commit 92f652c74a
5 changed files with 39 additions and 35 deletions

View File

@ -73,13 +73,13 @@ services:
networks: networks:
- envole-network - envole-network
ports: ports:
- "9001:80" - "9000:80"
volumes: volumes:
- ./volume/ninegate/data/private:/app/uploads - ./volume/ninegate/data/private:/app/uploads
- ./volume/ninegate/data/public:/app/public/uploads - ./volume/ninegate/data/public:/app/public/uploads
nextcloud: nextcloud:
image: reg.cadoles.com/envole/nextcloud image: docker.io/library/nextcloud
container_name: envole-nextcloud container_name: envole-nextcloud
restart: always restart: always
healthcheck: healthcheck:
@ -90,7 +90,7 @@ services:
networks: networks:
- envole-network - envole-network
ports: ports:
- 9002:80 - 9001:80
volumes: volumes:
- ./volume/nextcloud/html:/var/www/html - ./volume/nextcloud/html:/var/www/html
- ./volume/nextcloud/app:/var/www/html/custom_apps - ./volume/nextcloud/app:/var/www/html/custom_apps

View File

@ -6,6 +6,7 @@ RELEASE_SYSTEM=linux
# GLOBAL # GLOBAL
APP_ENV=PROD APP_ENV=PROD
WEB_URL=localhost WEB_URL=localhost
WEB_PROTOCOL=http
# ADMIN USER # ADMIN USER
ADMIN_USER=admin ADMIN_USER=admin
@ -56,35 +57,35 @@ CAS_PASSWORD=${ADMIN_PASSWORD}-keycloak
CAS_HOST=keycloak CAS_HOST=keycloak
CAS_PORT=8443 CAS_PORT=8443
CAS_PATH=/auth/realms/envole/protocol/cas CAS_PATH=/auth/realms/envole/protocol/cas
CAS_URL=https://${CAS_HOST}:${CAS_PORT} CAS_URL=${WEB_PROTOCOL}://${CAS_HOST}:${CAS_PORT}
# NINEGATE # NINEGATE
NINEGATE_SERVICE_NAME=ninegate NINEGATE_SERVICE_NAME=ninegate
NINEGATE_ACTIVATE=1 NINEGATE_ACTIVATE=1
NINEGATE_LOCAL=1 NINEGATE_LOCAL=1
NINEGATE_URL=http://localhost:8000 NINEGATE_URL=${WEB_PROTOCOL}://${WEB_URL}:9000
# NINEGATE # NINEGATE
NEXTCLOUD_SERVICE_NAME=nextcloud NEXTCLOUD_SERVICE_NAME=nextcloud
NEXTCLOUD_ACTIVATE=0 NEXTCLOUD_ACTIVATE=0
NEXTCLOUD_LOCAL=1 NEXTCLOUD_LOCAL=1
NEXTCLOUD_URL=http://localhost:8001 NEXTCLOUD_URL=${WEB_PROTOCOL}://${WEB_URL}:9001
# ADMINER # ADMINER
ADMINER_SERVICE_NAME=adminer ADMINER_SERVICE_NAME=adminer
ADMINER_ACTIVATE=0 ADMINER_ACTIVATE=0
ADMINER_LOCAL=1 ADMINER_LOCAL=1
ADMINER_URL=http://localhost:9000/?server=${MARIADB_SERVICE_NAME}&username=${MARIADB_USER} ADMINER_URL=${WEB_PROTOCOL}://${WEB_URL}:9100/?server=${MARIADB_SERVICE_NAME}&username=${MARIADB_USER}
# PHPLDAPADMIN # PHPLDAPADMIN
PHPLDAPADMIN_SERVICE_NAME=phpldapadmin PHPLDAPADMIN_SERVICE_NAME=phpldapadmin
PHPLDAPADMIN_ACTIVATE=0 PHPLDAPADMIN_ACTIVATE=0
PHPLDAPADMIN_LOCAL=1 PHPLDAPADMIN_LOCAL=1
PHPLDAPADMIN_URL=http://localhost:9001 PHPLDAPADMIN_URL=${WEB_PROTOCOL}://${WEB_URL}:9101
# NINEAPACHE # NINEAPACHE
NINEAPACHE_SERVICE_NAME=nineapache NINEAPACHE_SERVICE_NAME=nineapache
NINEAPACHE_ACTIVATE=0 NINEAPACHE_ACTIVATE=0
NINEAPACHE_LOCAL=1 NINEAPACHE_LOCAL=1
NINEAPACHE_URL=http://localhost:9002 NINEAPACHE_URL=${WEB_PROTOCOL}://${WEB_URL}:9102

View File

@ -7,5 +7,4 @@ MYSQL_USER=${MARIADB_USER}
MYSQL_PASSWORD=${MARIADB_PASSWORD} MYSQL_PASSWORD=${MARIADB_PASSWORD}
NEXTCLOUD_ADMIN_USER=${ADMIN_USER} NEXTCLOUD_ADMIN_USER=${ADMIN_USER}
NEXTCLOUD_ADMIN_PASSWORD=${ADMIN_PASSWORD} NEXTCLOUD_ADMIN_PASSWORD=${ADMIN_PASSWORD}
NEXTCLOUD_ALIAS=/ NEXTCLOUD_ALIAS=

View File

@ -6,19 +6,23 @@
# Fusionner l'ensemble des fichier .env en un seul # Fusionner l'ensemble des fichier .env en un seul
rm -f ./.env.local rm -f ./.env.local
cat ./env/.env* >> ./.env.local cat ./env/.env* >> ./.env.local
. ./.env.local . ./misc/tools/e-ihm.sh
. .env
. ./env/.env
. ./env/.env.local
# Start script
clear
BigTitle "ENVOLE"
echo "========"
echo ${WEB_URL}
echo "========"
# on remplace les valeur reprise dans les autres .env car podman interprète mal # on remplace les valeur reprise dans les autres .env car podman interprète mal
#while IFS= read -r match; do sed -i 's#${WEB_URL}#'${WEB_URL}'#g' ./.env.local
# eval "val=\${$match}" sed -i 's#${WEB_PROTOCOL}#'${WEB_PROTOCOL}'#g' ./.env.local
# echo ${ADMIN_PASSWORD} . ./.env.local
# echo ${match}
# echo ${!match}
# echo $val
# sed -i "s/${match}/${val}/g" ./.env.local
#done < <(grep -oP '\$\{\w+\}' ./.env.local)
sed -i 's#${ADMIN_PASSWORD}#'${ADMIN_PASSWORD}'#g' ./.env.local sed -i 's#${ADMIN_PASSWORD}#'${ADMIN_PASSWORD}'#g' ./.env.local
sed -i 's#${ADMIN_USER}#'${ADMIN_USER}'#g' ./.env.local sed -i 's#${ADMIN_USER}#'${ADMIN_USER}'#g' ./.env.local
@ -49,14 +53,9 @@ sed -i 's#${NEXTCLOUD_ACTIVATE}#'${NEXTCLOUD_ACTIVATE}'#g' ./.env.local
sed -i 's#${NEXTCLOUD_URL}#'${NEXTCLOUD_URL}'#g' ./.env.local sed -i 's#${NEXTCLOUD_URL}#'${NEXTCLOUD_URL}'#g' ./.env.local
# Include # Include
. .env . ./.env.local
. ./misc/tools/e-ihm.sh
. ./env/.env
. ./env/.env.local
# Start script
clear
BigTitle "ENVOLE"
#=========================================================================================================================================== #===========================================================================================================================================
#== STOP =================================================================================================================================== #== STOP ===================================================================================================================================

View File

@ -14,8 +14,8 @@ echo "== INSTALLATION APP NEXTCLOUD ============================================
echo "== CONFIG" echo "== CONFIG"
run_as 'php occ config:system:set trusted_domains 1 --value '${WEB_URL} run_as 'php occ config:system:set trusted_domains 1 --value '${WEB_URL}
run_as 'php occ config:system:set overwrite.cli.url --value '${NEXTCLOUD_URL} run_as 'php occ config:system:set overwrite.cli.url --value '${NEXTCLOUD_URL}
#run_as 'php occ config:system:set htaccess.RewriteBase --value '${NEXTCLOUD_ALIAS}
run_as 'php occ config:system:set overwritewebroot --value '${NEXTCLOUD_ALIAS} run_as 'php occ config:system:set overwritewebroot --value '${NEXTCLOUD_ALIAS}
run_as 'php occ config:system:set htaccess.RewriteBase --value '${NEXTCLOUD_ALIAS}
echo echo
echo "== CALENDAR" echo "== CALENDAR"
@ -59,14 +59,14 @@ run_as 'php occ app:install files_mindmap'
run_as 'php occ app:update files_mindmap' run_as 'php occ app:update files_mindmap'
run_as 'php occ app:enable files_mindmap' run_as 'php occ app:enable files_mindmap'
echo
echo "== USER CAS"
if [[ "${MODE_AUTH}" == "CAS" && "${CAS_ACTIVATE}" == "1" ]] if [[ "${MODE_AUTH}" == "CAS" && "${CAS_ACTIVATE}" == "1" ]]
then then
echo
echo "== USER CAS"
cp -rf /envole/app/user_cas /var/www/html/custom_apps cp -rf /envole/app/user_cas /var/www/html/custom_apps
chown www-data:www-data /var/www/html/custom_apps -R chown www-data:www-data /var/www/html/custom_apps -R
run_as 'php occ config:app:set user_cas cas_server_hostname --value='${CAS_HOST}' -q' run_as 'php occ config:app:set user_cas cas_server_hostname --value='${CAS_HOST}' -q'
run_as 'php occ config:app:set user_cas cas_server_path --value=/'${CAS_PATH}' -q' run_as 'php occ config:app:set user_cas cas_server_path --value='${CAS_PATH}' -q'
run_as 'php occ config:app:set user_cas cas_server_port --value='${CAS_PORT}' -q' run_as 'php occ config:app:set user_cas cas_server_port --value='${CAS_PORT}' -q'
run_as 'php occ config:app:set user_cas cas_use_proxy --value=0 -q' run_as 'php occ config:app:set user_cas cas_use_proxy --value=0 -q'
run_as 'php occ config:app:set user_cas cas_server_version --value=2.0 -q' run_as 'php occ config:app:set user_cas cas_server_version --value=2.0 -q'
@ -80,9 +80,14 @@ fi
echo echo
echo "== USER LDAP" echo "== USER LDAP"
run_as 'php occ app:install user_ldap' if [[ "${LDAP_ACTIVATE}" == "1" ]]
run_as 'php occ app:update user_ldap' then
run_as 'php occ app:enable user_ldap' run_as 'php occ app:install user_ldap'
run_as 'php occ app:update user_ldap'
run_as 'php occ app:enable user_ldap'
else
run_as 'php occ app:disable user_ldap'
fi
echo echo
echo echo