Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master 471 #472

Merged
merged 3 commits into from
Oct 10, 2024
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 20240930 - build 2024-09-30";
const NAME = "Doil Version 20241010 - build 2024-10-10";

public function __construct(Command ...$commands)
{
Expand Down
10 changes: 6 additions & 4 deletions app/src/Commands/Instances/DeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ protected function deleteInstance(
$this->docker->removeContainer($instance . "_" . $suffix);

$this->docker->executeCommand(self::SALT_MAIN, "doil_saltmain", "salt-key", "-d", "$instance.$suffix", "-y", "-q");
$this->docker->executeDockerCommand(
"doil_proxy",
"rm -f /etc/nginx/conf.d/sites/$instance.conf && /root/generate_index_html.sh"
);
if ($this->docker->isInstanceUp($path)) {
$this->docker->executeDockerCommand(
"doil_proxy",
"rm -f /etc/nginx/conf.d/sites/$instance.conf && /root/generate_index_html.sh"
);
}

if ($this->docker->hasVolume($instance)) {
$this->docker->removeVolume($instance);
Expand Down
6 changes: 6 additions & 0 deletions app/tests/Commands/Instances/DeleteCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ public function test_execute() : void
["/usr/local/lib/doil/server/mail/", "doil_mail", "/bin/bash", "-c", "/root/delete-postbox-configuration.sh $instance &>/dev/null"]
)
;
$docker
->expects($this->once())
->method("isInstanceUp")
->with("/usr/local/share/doil/instances/master")
->willReturn(true)
;
$docker
->expects($this->once())
->method("executeDockerCommand")
Expand Down
1 change: 1 addition & 0 deletions setup/stack/states/apache/apache/default
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<Directory /var/www/html/>
AllowOverride All
Options -Indexes
Require all granted
</Directory>

Expand Down
8 changes: 8 additions & 0 deletions setup/updates/update-20241010.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

doil_update_20241010() {
cp -r ${SCRIPT_DIR}/../app/src/* /usr/local/lib/doil/app/src/
cp -r ${SCRIPT_DIR}/../setup/stack/* /usr/local/share/doil/stack/
docker exec -i doil_saltmain bash -c "salt -C '*.local or *.global' state.highstate saltenv=apache"
return $?
}
Loading