mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-28 06:20:14 +00:00
substitute volume variables in dockeractionmanager
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
@@ -205,6 +205,40 @@ class DockerActionManager
|
||||
public function CreateContainer(Container $container) : void {
|
||||
$volumes = [];
|
||||
foreach($container->GetVolumes()->GetVolumes() as $volume) {
|
||||
if($volume->name === '%BORGBACKUP_HOST_LOCATION%') {
|
||||
$volume->name = $this->configurationManager->GetBorgBackupHostLocation();
|
||||
if($volume->name === '') {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if($volume->name === '%NEXTCLOUD_MOUNT%') {
|
||||
$volume->name = $this->configurationManager->GetNextcloudMount();
|
||||
if($volume->name === '') {
|
||||
continue;
|
||||
}
|
||||
} elseif ($volume->name === '%NEXTCLOUD_DATADIR%') {
|
||||
$volume->name = $this->configurationManager->GetNextcloudDatadirMount();
|
||||
if ($volume->name === '') {
|
||||
continue;
|
||||
}
|
||||
} elseif ($volume->name === '%DOCKER_SOCKET_PATH%') {
|
||||
$volume->name = $this->configurationManager->GetDockerSocketPath();
|
||||
if($volume->name === '') {
|
||||
continue;
|
||||
}
|
||||
} elseif ($volume->name === '%NEXTCLOUD_TRUSTED_CACERTS_DIR%') {
|
||||
$volume->name = $this->configurationManager->GetTrustedCacertsDir();
|
||||
if($volume->name === '') {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ($volume->mountPoint === '%NEXTCLOUD_MOUNT%') {
|
||||
$volume->mountPoint = $this->configurationManager->GetNextcloudMount();
|
||||
if($volume->mountPoint === '') {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$volumeEntry = $volume->name . ':' . $volume->mountPoint;
|
||||
if($volume->isWritable) {
|
||||
$volumeEntry = $volumeEntry . ':' . 'rw';
|
||||
|
||||
Reference in New Issue
Block a user