Implemented fresh configuration loader
* Fresh can now identify and load freshdocker.conf config files
This commit is contained in:
@ -297,12 +297,37 @@ class Refresher
|
||||
$this->config = new ComposeConfiguration($configFile);
|
||||
return;
|
||||
}
|
||||
if (basename($configFile) == "freshdocker.conf") {
|
||||
$this->log->append("Using configuration file ".$this->path."/freshdocker.conf");
|
||||
$this->config = new LocalConfiguration($this->path."/freshdocker.conf");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (file_exists($this->path."/docker-compose.yml")) {
|
||||
$this->log->append("Using configuration file ".$this->path."/docker-compose.yml");
|
||||
$this->config = new ComposeConfiguration($this->path."/docker-compose.yml");
|
||||
return;
|
||||
}
|
||||
if (file_exists($this->path."/freshdocker.conf")) {
|
||||
$this->log->append("Using configuration file ".$this->path."/freshdocker.conf");
|
||||
$this->config = new LocalConfiguration($this->path."/freshdocker.conf");
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'fresh':
|
||||
if ($configFile) {
|
||||
if (basename($configFile) == "freshdocker.confl") {
|
||||
$this->log->append("Using configuration file ".$configFile);
|
||||
$this->config = new LocalConfiguration($configFile);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (file_exists($this->path."/freshdocker.conf")) {
|
||||
$this->log->append("Using configuration file ".$this->path."/freshdocker.conf");
|
||||
$this->config = new LocalConfiguration($this->path."/freshdocker.conf");
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'compose':
|
||||
|
Reference in New Issue
Block a user