mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-21 02:40:09 +00:00
jellyfin: allow Jellyfin to resolve lldap hostname while running in host network mode (#7941)
This commit is contained in:
@@ -41,6 +41,9 @@ readonly class ContainerDefinitionFetcher {
|
||||
{
|
||||
$data = json_decode((string)file_get_contents(DataConst::GetContainersDefinitionPath()), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
// We store this information for later because we need to use it to distinct between community containers and default containers.
|
||||
$standardContainerNames = array_column($data['aio_services_v1'], 'container_name');
|
||||
|
||||
$additionalContainerNames = [];
|
||||
foreach ($this->configurationManager->aioCommunityContainers as $communityContainer) {
|
||||
if ($communityContainer !== '') {
|
||||
@@ -212,6 +215,15 @@ readonly class ContainerDefinitionFetcher {
|
||||
if (!$this->configurationManager->isWhiteboardEnabled) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
// Skip dependencies on community containers that are not currently enabled.
|
||||
// Only apply this when the current entry is itself a community container,
|
||||
// and the dependency is not an enabled community container or a standard built-in container.
|
||||
if (in_array($entry['container_name'], $additionalContainerNames, true)
|
||||
&& !in_array($value, $additionalContainerNames, true)
|
||||
&& !in_array($value, $standardContainerNames, true)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$dependsOn[] = $value;
|
||||
}
|
||||
|
||||
@@ -425,6 +425,13 @@ readonly class DockerActionManager {
|
||||
// $mounts[] = ["Type" => "bind", "Source" => $volume->name, "Target" => $volume->mountPoint, "ReadOnly" => !$volume->isWritable, "BindOptions" => [ "Propagation" => "rshared"]];
|
||||
// }
|
||||
|
||||
// Special things for the jellyfin community container
|
||||
} elseif ($container->identifier === 'nextcloud-aio-jellyfin') {
|
||||
$lldapIp = gethostbyname('nextcloud-aio-lldap');
|
||||
if ($lldapIp !== 'nextcloud-aio-lldap') {
|
||||
$requestBody['HostConfig']['ExtraHosts'] = ['nextcloud-aio-lldap:' . $lldapIp];
|
||||
}
|
||||
|
||||
// Special things for the caddy community container
|
||||
} elseif ($container->identifier === 'nextcloud-aio-caddy') {
|
||||
$requestBody['HostConfig']['ExtraHosts'] = ['host.docker.internal:host-gateway'];
|
||||
|
||||
Reference in New Issue
Block a user