From fc95b4078c0b6b9142dde79964653af01fdd0cda Mon Sep 17 00:00:00 2001 From: daniwe4 Date: Fri, 3 Jul 2026 13:12:25 +0200 Subject: [PATCH 1/6] master sass: pin sass to version 1.77.5 --- setup/stack/states/dev/devtools/install-sass.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/stack/states/dev/devtools/install-sass.sh b/setup/stack/states/dev/devtools/install-sass.sh index 9947bfe7..340455b5 100644 --- a/setup/stack/states/dev/devtools/install-sass.sh +++ b/setup/stack/states/dev/devtools/install-sass.sh @@ -1,4 +1,4 @@ #!/bin/bash npm update -g npm -npm install -g sass \ No newline at end of file +npm install -g sass@1.77.5 \ No newline at end of file From 9a651a830f61546ba2979ceedfeb776099f8de18 Mon Sep 17 00:00:00 2001 From: daniwe4 Date: Fri, 3 Jul 2026 13:14:15 +0200 Subject: [PATCH 2/6] master CreateCommand/PackCreateCommand: fix vvariable syntax inside of " --- app/src/Commands/Instances/CreateCommand.php | 19 ++++++++++++------- app/src/Commands/Pack/PackCreateCommand.php | 8 ++++---- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/app/src/Commands/Instances/CreateCommand.php b/app/src/Commands/Instances/CreateCommand.php index 376155ff..0d668d0b 100644 --- a/app/src/Commands/Instances/CreateCommand.php +++ b/app/src/Commands/Instances/CreateCommand.php @@ -354,21 +354,21 @@ public function execute(InputInterface $input, OutputInterface $output) : int if ($keycloak) { $samlpass = $this->generatePassword(33); - $this->docker->setGrain($instance_salt_name, "samlpass", "$samlpass"); + $this->docker->setGrain($instance_salt_name, "samlpass", "${samlpass}"); sleep(1); $samlsalt = $this->generatePassword(33); - $this->docker->setGrain($instance_salt_name, "samlsalt", "$samlsalt"); + $this->docker->setGrain($instance_salt_name, "samlsalt", "${samlsalt}"); sleep(1); } - $this->docker->setGrain($instance_salt_name, "mpass", "$mysql_password"); + $this->docker->setGrain($instance_salt_name, "mpass", "${mysql_password}"); sleep(1); - $this->docker->setGrain($instance_salt_name, "cpass", "$cron_password"); + $this->docker->setGrain($instance_salt_name, "cpass", "${cron_password}"); sleep(1); - $this->docker->setGrain($instance_salt_name, "cron_path", "$cron_path"); + $this->docker->setGrain($instance_salt_name, "cron_path", "${cron_path}"); sleep(1); if ($update_token) { - $this->docker->setGrain($instance_salt_name, "update_token", "${$update_token}"); + $this->docker->setGrain($instance_salt_name, "update_token", "${update_token}"); sleep(1); } $this->docker->setGrain($instance_salt_name, "doil_domain", $http_scheme . $host . "/" . $options["name"]); @@ -747,8 +747,13 @@ protected function gatherOptionData(InputInterface $input, OutputInterface $outp } $options["skip_readme"] = $skip_readme; + $office = false; + if (array_key_exists("enable_office", $doil_conf)) { + $office = $doil_conf['enable_office']; + } + // Enable office support - if (!$enable_office && $one_option_missed && $doil_conf['enable_office']) { + if (!$enable_office && $one_option_missed && $office) { $question = new ConfirmationQuestion( "Enable office support? [yN]: ", false diff --git a/app/src/Commands/Pack/PackCreateCommand.php b/app/src/Commands/Pack/PackCreateCommand.php index f3839656..140faaa5 100644 --- a/app/src/Commands/Pack/PackCreateCommand.php +++ b/app/src/Commands/Pack/PackCreateCommand.php @@ -361,17 +361,17 @@ public function execute(InputInterface $input, OutputInterface $output) : int if ($keycloak) { $samlpass = $this->generatePassword(33); $samlsalt = $this->generatePassword(33); - $this->docker->setGrain($instance_salt_name, "samlpass", "$samlpass"); - $this->docker->setGrain($instance_salt_name, "samlsalt", "$samlsalt"); + $this->docker->setGrain($instance_salt_name, "samlpass", "${samlpass}"); + $this->docker->setGrain($instance_salt_name, "samlsalt", "${samlsalt}"); sleep(1); } $this->docker->setGrain($instance_salt_name, "mpass", "${mysql_password}"); sleep(1); - $this->docker->setGrain($instance_salt_name, "cpass", "$cron_password"); + $this->docker->setGrain($instance_salt_name, "cpass", "${cron_password}"); sleep(1); - $this->docker->setGrain($instance_salt_name, "cron_path", "$cron_path"); + $this->docker->setGrain($instance_salt_name, "cron_path", "${cron_path}"); sleep(1); if ($update_token) { $this->docker->setGrain($instance_salt_name, "update_token", "${update_token}"); From 2df1cbbc9b65bf3569d6df495c4547b83c284c93 Mon Sep 17 00:00:00 2001 From: daniwe4 Date: Fri, 3 Jul 2026 13:14:58 +0200 Subject: [PATCH 3/6] master Update: add update file for 20260703 --- app/src/App.php | 2 +- setup/updates/update-20260707.sh | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 setup/updates/update-20260707.sh diff --git a/app/src/App.php b/app/src/App.php index 0986237b..6110fd69 100644 --- a/app/src/App.php +++ b/app/src/App.php @@ -9,7 +9,7 @@ class App extends Application { - const NAME = "Doil Version 20260624 - build 2026-06-24"; + const NAME = "Doil Version 20260707 - build 2026-07-07"; public function __construct(Command ...$commands) { diff --git a/setup/updates/update-20260707.sh b/setup/updates/update-20260707.sh new file mode 100644 index 00000000..7aa07caf --- /dev/null +++ b/setup/updates/update-20260707.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +doil_update_20260707() { + cp -r ${SCRIPT_DIR}/../app/src/* /usr/local/lib/doil/app/src/ + cp -r ${SCRIPT_DIR}/../setup/stack/states/dev/* /usr/local/share/doil/stack/states/dev/ + cp -r ${SCRIPT_DIR}/../setup/templates/salt/docker-compose.yml /usr/local/lib/doil/server/salt/ + cp -r ${SCRIPT_DIR}/../setup/templates/mail/docker-compose.yml /usr/local/lib/doil/server/mail/ + cp -r ${SCRIPT_DIR}/../setup/templates/proxy/docker-compose.yml /usr/local/lib/doil/server/proxy/ + + apt-get install yq -y + + for DIR in /home/$SUDO_USER/.doil/instances/* + do + yq -S '.services.[].healthcheck |= . + {"test": "curl -f http://localhost && mysql -u root --execute \"SHOW DATABASES;\" || exit 1", "interval": "10s", "timeout": "5s", "retries": "3", "start_period": "40s", "start_interval": "5s"}' "${DIR}"/docker-compose.yml > "${DIR}"/tmp.yml && mv "${DIR}"/tmp.yml "${DIR}"/docker-compose.yml + done + + for DIR in $(doil_get_conf global_instances_path=)/* + do + yq -S '.services.[].healthcheck |= . + {"test": "curl -f http://localhost && mysql -u root --execute \"SHOW DATABASES;\" || exit 1", "interval": "10s", "timeout": "5s", "retries": "3", "start_period": "40s", "start_interval": "5s"}' "${DIR}"/docker-compose.yml > "${DIR}"/tmp.yml && mv "${DIR}"/tmp.yml "${DIR}"/docker-compose.yml + done + + apt-get remove yq -y + + return $? +} \ No newline at end of file From c3af2e4aa165c946339e4e69177dcab316daaf48 Mon Sep 17 00:00:00 2001 From: daniwe4 Date: Fri, 3 Jul 2026 13:33:21 +0200 Subject: [PATCH 4/6] master IDEA-Dir:568 revert changes from https://github.com/conceptsandtraining/doil/pull/528/changes --- app/src/Commands/Pack/ExportCommand.php | 8 -------- app/src/Commands/Pack/ImportCommand.php | 10 ---------- app/src/Lib/FileSystem/Filesystem.php | 1 - app/src/Lib/FileSystem/FilesystemShell.php | 8 -------- 4 files changed, 27 deletions(-) diff --git a/app/src/Commands/Pack/ExportCommand.php b/app/src/Commands/Pack/ExportCommand.php index 4a57851a..1b44956d 100644 --- a/app/src/Commands/Pack/ExportCommand.php +++ b/app/src/Commands/Pack/ExportCommand.php @@ -143,14 +143,6 @@ public function execute(InputInterface $input, OutputInterface $output) : int $this->filesystem->makeDirectoryRecursive($name . "/var/www/html/.git"); $this->filesystem->makeDirectoryRecursive($name . "/conf"); - $idea_paths = $this->filesystem->find_dirs($path, ".idea", 3); - if (count($idea_paths) > 0) { - $idea_path = $idea_paths[0]; - $idea_base_path = substr($idea_path, strlen($path)); - $this->filesystem->makeDirectoryRecursive($name . "/conf" . $idea_base_path); - $this->filesystem->copyDirectory($idea_path, $name . "/conf" . $idea_base_path); - } - $this->docker->copy($instance . "_" . $suffix, "/var/ilias", $name . "/var/"); $this->docker->copy($instance . "_" . $suffix, "/var/www/html/.git/config", $name . "/var/www/html/.git/config"); if ($this->ilias_info->getIliasVersion($path) >= 10) { diff --git a/app/src/Commands/Pack/ImportCommand.php b/app/src/Commands/Pack/ImportCommand.php index 627cbb10..a90aadd5 100644 --- a/app/src/Commands/Pack/ImportCommand.php +++ b/app/src/Commands/Pack/ImportCommand.php @@ -228,16 +228,6 @@ public function execute(InputInterface $input, OutputInterface $output) : int ); } - $idea_paths = $this->filesystem->find_dirs($unpacked . "/conf", ".idea", 3); - if (count($idea_paths) > 0) { - $idea_path = $idea_paths[0]; - $idea_base_path = substr($idea_path, strlen($unpacked . "/conf")); - $this->filesystem->copyDirectory( - $idea_path, - $path . $idea_base_path) - ; - } - if ($this->filesystem->exists($unpacked . "/var/www/html/data")) { $this->filesystem->copyDirectory( $unpacked . "/var/www/html/data", diff --git a/app/src/Lib/FileSystem/Filesystem.php b/app/src/Lib/FileSystem/Filesystem.php index f8b639e2..a29473db 100644 --- a/app/src/Lib/FileSystem/Filesystem.php +++ b/app/src/Lib/FileSystem/Filesystem.php @@ -36,5 +36,4 @@ public function grepMysqlPasswordFromFile(string $path) : string; public function addToGitConfig(string $path, string $section, string $line) : void; public function parseIniFile(string $path) : array; public function getContent(string $path) : string; - public function find_dirs(string $path, string $name, int $depth = 0) : array; } \ No newline at end of file diff --git a/app/src/Lib/FileSystem/FilesystemShell.php b/app/src/Lib/FileSystem/FilesystemShell.php index 776e4d0b..e33012e2 100644 --- a/app/src/Lib/FileSystem/FilesystemShell.php +++ b/app/src/Lib/FileSystem/FilesystemShell.php @@ -257,12 +257,4 @@ public function getContent(string $path) : string { return file_get_contents($path); } - - public function find_dirs(string $path, string $name, int $depth = 0) : array - { - $output = []; - exec("find -L $path -maxdepth $depth -iname $name -type d", $output); - - return $output; - } } \ No newline at end of file From 1ff64313bf50c88933a4e1f28aef24fd293a423c Mon Sep 17 00:00:00 2001 From: daniwe4 Date: Tue, 7 Jul 2026 09:55:22 +0200 Subject: [PATCH 5/6] master 567: add healthcheck to instances --- setup/templates/mail/docker-compose.yml | 7 +++++++ setup/templates/minion/docker-compose.yml | 7 +++++++ setup/templates/proxy/docker-compose.yml | 7 +++++++ setup/templates/salt/docker-compose.yml | 7 +++++++ setup/updates/update-20260707.sh | 14 ++++++++++---- 5 files changed, 38 insertions(+), 4 deletions(-) diff --git a/setup/templates/mail/docker-compose.yml b/setup/templates/mail/docker-compose.yml index ad04db5a..345dd4b2 100755 --- a/setup/templates/mail/docker-compose.yml +++ b/setup/templates/mail/docker-compose.yml @@ -7,6 +7,13 @@ services: container_name: doil_mail hostname: doil domainname: mail + healthcheck: + test: "doveadm service status || exit 1" + interval: 10s + timeout: 5s + retries: 3 + start_period: 40s + start_interval: 5s networks: doil_proxy: ipv4_address: 172.24.0.253 diff --git a/setup/templates/minion/docker-compose.yml b/setup/templates/minion/docker-compose.yml index 10ed9813..16a25497 100755 --- a/setup/templates/minion/docker-compose.yml +++ b/setup/templates/minion/docker-compose.yml @@ -49,6 +49,13 @@ services: - type: bind source: ./conf/salt-minion.conf target: /etc/supervisor/conf.d/salt-minion.conf + healthcheck: + test: "curl -f http://localhost && mysql -u root --execute \"SHOW DATABASES;\" || exit 1" + interval: 10s + timeout: 5s + retries: 3 + start_period: 40s + start_interval: 5s environment: - ILIAS_INI_PATH=/var/www/html/ilias.ini.php - TZ=Europe/Berlin diff --git a/setup/templates/proxy/docker-compose.yml b/setup/templates/proxy/docker-compose.yml index 9a47b8de..f15c5169 100755 --- a/setup/templates/proxy/docker-compose.yml +++ b/setup/templates/proxy/docker-compose.yml @@ -7,6 +7,13 @@ services: container_name: doil_proxy hostname: doil domainname: proxy + healthcheck: + test: ["CMD", "service", "nginx", "status"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 40s + start_interval: 5s networks: doil_proxy: ipv4_address: 172.24.0.254 diff --git a/setup/templates/salt/docker-compose.yml b/setup/templates/salt/docker-compose.yml index 5cd1e826..6daec295 100755 --- a/setup/templates/salt/docker-compose.yml +++ b/setup/templates/salt/docker-compose.yml @@ -13,6 +13,13 @@ services: networks: saltnet: ipv4_address: 172.20.0.254 + healthcheck: + test: "salt-master --version || exit 1" + interval: 10s + timeout: 5s + retries: 3 + start_period: 40s + start_interval: 5s networks: saltnet: ipam: diff --git a/setup/updates/update-20260707.sh b/setup/updates/update-20260707.sh index 7aa07caf..20434c0f 100644 --- a/setup/updates/update-20260707.sh +++ b/setup/updates/update-20260707.sh @@ -7,19 +7,25 @@ doil_update_20260707() { cp -r ${SCRIPT_DIR}/../setup/templates/mail/docker-compose.yml /usr/local/lib/doil/server/mail/ cp -r ${SCRIPT_DIR}/../setup/templates/proxy/docker-compose.yml /usr/local/lib/doil/server/proxy/ - apt-get install yq -y + apt-get install yq -y >/var/log/doil/stream.log 2>&1 for DIR in /home/$SUDO_USER/.doil/instances/* do - yq -S '.services.[].healthcheck |= . + {"test": "curl -f http://localhost && mysql -u root --execute \"SHOW DATABASES;\" || exit 1", "interval": "10s", "timeout": "5s", "retries": "3", "start_period": "40s", "start_interval": "5s"}' "${DIR}"/docker-compose.yml > "${DIR}"/tmp.yml && mv "${DIR}"/tmp.yml "${DIR}"/docker-compose.yml + if [[ -d "$DIR" ]] + then + yq -S '.services.[].healthcheck |= . + {"test": "curl -f http://localhost && mysql -u root --execute \"SHOW DATABASES;\" || exit 1", "interval": "10s", "timeout": "5s", "retries": "3", "start_period": "40s", "start_interval": "5s"}' "${DIR}"/docker-compose.yml > "${DIR}"/tmp.yml && mv "${DIR}"/tmp.yml "${DIR}"/docker-compose.yml >/var/log/doil/stream.log 2>&1 + fi done for DIR in $(doil_get_conf global_instances_path=)/* do - yq -S '.services.[].healthcheck |= . + {"test": "curl -f http://localhost && mysql -u root --execute \"SHOW DATABASES;\" || exit 1", "interval": "10s", "timeout": "5s", "retries": "3", "start_period": "40s", "start_interval": "5s"}' "${DIR}"/docker-compose.yml > "${DIR}"/tmp.yml && mv "${DIR}"/tmp.yml "${DIR}"/docker-compose.yml + if [[ -d "$DIR" ]] + then + yq -S '.services.[].healthcheck |= . + {"test": "curl -f http://localhost && mysql -u root --execute \"SHOW DATABASES;\" || exit 1", "interval": "10s", "timeout": "5s", "retries": "3", "start_period": "40s", "start_interval": "5s"}' "${DIR}"/docker-compose.yml > "${DIR}"/tmp.yml && mv "${DIR}"/tmp.yml "${DIR}"/docker-compose.yml >/var/log/doil/stream.log 2>&1 + fi done - apt-get remove yq -y + apt-get remove yq -y >/var/log/doil/stream.log 2>&1 return $? } \ No newline at end of file From 8eeb03b9cfe847f6ea64a6fade70692c10014b58 Mon Sep 17 00:00:00 2001 From: daniwe4 Date: Wed, 8 Jul 2026 09:56:56 +0200 Subject: [PATCH 6/6] master ImportCommand:582 delete first line of mysql dump before import --- app/src/Commands/Pack/ImportCommand.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/Commands/Pack/ImportCommand.php b/app/src/Commands/Pack/ImportCommand.php index a90aadd5..2884ecc1 100644 --- a/app/src/Commands/Pack/ImportCommand.php +++ b/app/src/Commands/Pack/ImportCommand.php @@ -282,6 +282,13 @@ public function execute(InputInterface $input, OutputInterface $output) : int "-c", "mysql -e 'CREATE DATABASE ilias;'" ); + $this->docker->executeCommand( + $path, + $instance, + "bash", + "-c", + "sed -i '1d' /var/ilias/data/ilias.sql" + ); $this->docker->executeCommand( $path, $instance,