Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class App extends Application
{
const NAME = "Doil Version 20260707 - build 2026-07-07";
const NAME = "Doil Version 20260712 - build 2026-07-12";

public function __construct(Command ...$commands)
{
Expand Down
27 changes: 1 addition & 26 deletions setup/updates/update-20260707.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
#!/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 >/var/log/doil/stream.log 2>&1

for DIR in /home/$SUDO_USER/.doil/instances/*
do
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
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 >/var/log/doil/stream.log 2>&1

# this will be handled in the next update
return $?
}
38 changes: 38 additions & 0 deletions setup/updates/update-20260712.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

doil_update_20260712() {
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 >/var/log/doil/stream.log 2>&1
NOT_AVAILABLE=$?

if [[ $NOT_AVAILABLE != 0 ]]
then
echo "Can't install yq on your system. Only new created doil instances will show a health check."
exit 0
fi

for DIR in /home/$SUDO_USER/.doil/instances/*
do
if [[ -f "$DIR"/docker-compose.yml ]]
then
yq --yaml-output '.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
if [[ -f "$DIR"/docker-compose.yml ]]
then
yq --yaml-output '.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 >/var/log/doil/stream.log 2>&1

return $?
}
Loading