Skip to content
Snippets Groups Projects
Commit a74ce956 authored by jurgenhaas's avatar jurgenhaas
Browse files

Bug fix

parent f044080f
No related branches found
No related tags found
No related merge requests found
......@@ -435,7 +435,7 @@ class Handler extends BaseHandler {
* @return string
*/
private function getDockerProxy(string $projectname): string {
foreach ($this->readNetworkConfig($projectname)['Containers'] as $container) {
foreach ($this->readNetworkConfig()['Containers'] as $container) {
if (isset($container['Name']) && in_array($container['Name'], ['traefik_traefik_1', 'traefik-traefik-1'])) {
return explode('/', $container['IPv4Address'])[0];
}
......@@ -491,14 +491,12 @@ class Handler extends BaseHandler {
}
/**
* @param string $projectname
*
* @return array
*/
private function readNetworkConfig(string $projectname): array {
private function readNetworkConfig(): array {
try {
$output = [];
exec('docker network inspect traefik_' . $projectname, $output);
exec('docker network inspect traefik-public', $output);
return json_decode(implode('', $output), TRUE)[0];
}
catch (Exception $ex) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment