diff --git a/misc/images/wordpress/containers/wordpress/wp-cli.phar b/misc/images/wordpress/containers/wordpress/wp-cli.phar index fabd20e..a5b9521 100644 Binary files a/misc/images/wordpress/containers/wordpress/wp-cli.phar and b/misc/images/wordpress/containers/wordpress/wp-cli.phar differ diff --git a/misc/tools/dicos.sh b/misc/tools/dicos.sh index cca4bb5..bb2ea21 100755 --- a/misc/tools/dicos.sh +++ b/misc/tools/dicos.sh @@ -2,8 +2,6 @@ if [ -f "$dir/dicos/.env.dicos" ]; then - echo $dir - dicos="$dir/dicos/.env.dicos" # Exporter la variable diff --git a/services/50-nextcloud/volume/nine/app/user_cas/appinfo/info.xml b/services/50-nextcloud/volume/nine/app/user_cas/appinfo/info.xml index 58346f4..1b270cc 100644 --- a/services/50-nextcloud/volume/nine/app/user_cas/appinfo/info.xml +++ b/services/50-nextcloud/volume/nine/app/user_cas/appinfo/info.xml @@ -30,7 +30,7 @@ - + diff --git a/services/50-nextcloud/volume/nine/app/user_cas/lib/Controller/AuthenticationController.php b/services/50-nextcloud/volume/nine/app/user_cas/lib/Controller/AuthenticationController.php index f8c0c4b..a2c3274 100644 --- a/services/50-nextcloud/volume/nine/app/user_cas/lib/Controller/AuthenticationController.php +++ b/services/50-nextcloud/volume/nine/app/user_cas/lib/Controller/AuthenticationController.php @@ -123,7 +123,7 @@ class AuthenticationController extends Controller $this->loggingService->write(\OCA\UserCas\Service\LoggingService::FATAL, 'Fatal error with code: ' . $e->getCode() . ' and message: ' . $e->getMessage()); - header("Location: " . $this->appService->getAbsoluteURL('/')); + header("Location: " . this->getServiceBasedUrl()); die(); } } @@ -217,7 +217,7 @@ class AuthenticationController extends Controller $this->loggingService->write(\OCA\UserCas\Service\LoggingService::FATAL, 'Fatal error with code: ' . $e->getCode() . ' and message: ' . $e->getMessage()); - header("Location: " . $this->appService->getAbsoluteURL('/')); + header("Location: " . this->getServiceBasedUrl()); die(); } } @@ -278,19 +278,26 @@ class AuthenticationController extends Controller $newProtocol = 'http://'; - if (intval($this->config->getAppValue($this->appName, 'cas_server_port')) === 443) { - - $newProtocol = 'https://'; - } $params['backUrl'] = $newProtocol . $this->config->getAppValue($this->appName, 'cas_server_hostname') . $this->config->getAppValue($this->appName, 'cas_server_path'); } else {*/ - $params['backUrl'] = $this->appService->getAbsoluteURL('/'); + + $params['backUrl'] = this->getServiceBasedUrl(); //} $response = new TemplateResponse($this->appName, 'cas-error', $params, 'guest'); return $response; } + + private function getServiceBasedUrl(): string { + $overwrite = \OC::$server->getConfig()->getSystemValue('overwrite.cli.url'); + if($overwrite) return $overwrite; + + $httpProtocol = \OC::$server->getConfig()->getSystemValue('protocol'); + $currentUrl = $_SERVER['SERVER_NAME']; + + return $httpProtocol . $currentUrl; + } } diff --git a/services/50-nextcloud/volume/nine/app/user_cas/lib/Hooks/UserHooks.php b/services/50-nextcloud/volume/nine/app/user_cas/lib/Hooks/UserHooks.php index 68bf83f..64850e9 100644 --- a/services/50-nextcloud/volume/nine/app/user_cas/lib/Hooks/UserHooks.php +++ b/services/50-nextcloud/volume/nine/app/user_cas/lib/Hooks/UserHooks.php @@ -406,7 +406,7 @@ class UserHooks # Reset cookie setcookie("user_cas_redirect_url", '/', 0, '/'); - \phpCAS::logout(array("service" => $this->appService->getAbsoluteURL('/'))); + \phpCAS::logout(array("service" => $this->getServiceBasedUrl())); } else { @@ -445,4 +445,14 @@ class UserHooks return $attributes; } + + private function getServiceBasedUrl(): string { + $overwrite = \OC::$server->getConfig()->getSystemValue('overwrite.cli.url'); + if($overwrite) return $overwrite; + + $httpProtocol = \OC::$server->getConfig()->getSystemValue('protocol'); + $currentUrl = $_SERVER['SERVER_NAME']; + + return $httpProtocol . $currentUrl; + } } \ No newline at end of file diff --git a/services/50-nextcloud/volume/prestart/prestart.sh b/services/50-nextcloud/volume/prestart/prestart.sh index 12e4732..dc3d7c8 100755 --- a/services/50-nextcloud/volume/prestart/prestart.sh +++ b/services/50-nextcloud/volume/prestart/prestart.sh @@ -54,7 +54,7 @@ run_as 'php occ app:update files_external' run_as 'php occ app:enable files_external' if [[ "${NEXTCLOUD_SAMBA}" == "1" ]] then -run_as 'php occ files_external:import /envole/mount.json -q' +run_as 'php occ files_external:import /nine/mount.json -q' fi echo @@ -67,7 +67,7 @@ echo echo "== USER CAS" if [[ "${MODE_AUTH}" == "CAS" && "${CAS_ACTIVATE}" == "1" ]] then - cp -rf /envole/app/user_cas /var/www/html/custom_apps + cp -rf /nine/app/user_cas /var/www/html/custom_apps 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_path --value='${CAS_PATH}' -q' diff --git a/services/50-nineskeletor/apache/apache.conf b/services/50-nineskeletor/apache/apache.conf deleted file mode 100644 index dbcf372..0000000 --- a/services/50-nineskeletor/apache/apache.conf +++ /dev/null @@ -1,5 +0,0 @@ - -# nineskeletor -ProxyPass /nineskeletor http://nineskeletor/nineskeletor retry=0 keepalive=On -ProxyPassReverse /nineskeletor http://nineskeletor/nineskeletor retry=0 - diff --git a/services/50-wordpress/env/.env b/services/50-wordpress/env/.env index 39f265c..7e608aa 100644 --- a/services/50-wordpress/env/.env +++ b/services/50-wordpress/env/.env @@ -8,7 +8,7 @@ WORDPRESS_DB_PASSWORD=${MARIADB_PASSWORD} WORDPRESS_TITLE=wordpress WORDPRESS_USER=${ADMIN_USER} WORDPRESS_PASSWORD=${ADMIN_PASSWORD} -WORDPRESS_EMAIL=${ADMIN_USER}@noreply.fr +WORDPRESS_EMAIL=${ADMIN_EMAIL} WORDPRESS_PROTOCOL=${PROTOCOLE} WORDPRESS_DOMAINE=${WEB_URL} WORDPRESS_ALIAS=/wordpress/