mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
Revert "fix host mounts for windows"
This reverts commit 3c6cb85c74.
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
4c4080077e
commit
82dd888109
3 changed files with 5 additions and 43 deletions
|
|
@ -512,24 +512,4 @@ class ConfigurationManager
|
||||||
$config['timezone'] = '';
|
$config['timezone'] = '';
|
||||||
$this->WriteConfig($config);
|
$this->WriteConfig($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isWindowsPath(string $path) : bool {
|
|
||||||
$windowsPath = '/host_mnt/';
|
|
||||||
if (str_starts_with($path, $windowsPath)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function GetWindowsVolumeName(string $volumeName) : string {
|
|
||||||
$name = '';
|
|
||||||
if ($volumeName === $this->GetNextcloudDatadirMount()) {
|
|
||||||
$name = 'nextcloud_aio_nextcloud_data';
|
|
||||||
} elseif ($volumeName === $this->GetNextcloudMount()) {
|
|
||||||
$name = 'nextcloud_aio_nextcloud_mount';
|
|
||||||
} elseif ($volumeName === $this->GetBorgBackupHostLocation()) {
|
|
||||||
$name = 'nextcloud_aio_backup';
|
|
||||||
}
|
|
||||||
return $name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -192,24 +192,7 @@ class DockerActionManager
|
||||||
$url,
|
$url,
|
||||||
[
|
[
|
||||||
'json' => [
|
'json' => [
|
||||||
'Name' => $volume->name,
|
'name' => $volume->name,
|
||||||
],
|
|
||||||
]
|
|
||||||
);
|
|
||||||
} elseif ($this->configurationManager->isWindowsPath($volume->name)) {
|
|
||||||
$name = $this->configurationManager->GetWindowsVolumeName($volume->name);
|
|
||||||
$this->guzzleClient->request(
|
|
||||||
'POST',
|
|
||||||
$url,
|
|
||||||
[
|
|
||||||
'json' => [
|
|
||||||
'Name' => $name,
|
|
||||||
'Driver' => 'local',
|
|
||||||
'DriverOpts' => [
|
|
||||||
'type' => 'none',
|
|
||||||
'device' => $volume->name,
|
|
||||||
'o' => 'bind',
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
@ -220,9 +203,6 @@ class DockerActionManager
|
||||||
public function CreateContainer(Container $container) : void {
|
public function CreateContainer(Container $container) : void {
|
||||||
$volumes = [];
|
$volumes = [];
|
||||||
foreach($container->GetVolumes()->GetVolumes() as $volume) {
|
foreach($container->GetVolumes()->GetVolumes() as $volume) {
|
||||||
if ($this->configurationManager->isWindowsPath($volume->name)) {
|
|
||||||
$volume->name = $this->configurationManager->GetWindowsVolumeName($volume->name);
|
|
||||||
}
|
|
||||||
$volumeEntry = $volume->name . ':' . $volume->mountPoint;
|
$volumeEntry = $volume->name . ':' . $volume->mountPoint;
|
||||||
if($volume->isWritable) {
|
if($volume->isWritable) {
|
||||||
$volumeEntry = $volumeEntry . ':' . 'rw';
|
$volumeEntry = $volumeEntry . ':' . 'rw';
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,8 @@ docker run -it ^
|
||||||
nextcloud/all-in-one:latest
|
nextcloud/all-in-one:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Please note:** AIO works on Windows in general but due to a bug in `Docker for Windows`, it currently does not support mounting directories from the host into AIO which means that `NEXTCLOUD_DATADIR`, `NEXTCLOUD_MOUNT` do not work and the built-in backup solution is not able to write to the host OS. See https://github.com/nextcloud/all-in-one/discussions/600.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### How to resolve firewall problems with Fedora Linux, RHEL OS, CentOS, SUSE Linux and others?
|
### How to resolve firewall problems with Fedora Linux, RHEL OS, CentOS, SUSE Linux and others?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue