Debuggin'

This commit is contained in:
Greyscale 2024-06-25 15:27:42 +02:00
parent a909cba332
commit 42b3b4912b
No known key found for this signature in database
GPG key ID: 74BAFF55434DA4B2

View file

@ -211,6 +211,7 @@ class Bouncer
} }
// If BOUNCER_IGNORE is set, skip this service. // If BOUNCER_IGNORE is set, skip this service.
if (isset($envs['BOUNCER_IGNORE'])) { if (isset($envs['BOUNCER_IGNORE'])) {
$this->logger->warning('Container {container_name} has BOUNCER_IGNORE set, skipping.', ['emoji' => Emoji::warning() . ' Bouncer.php', 'container_name' => $container['Name']]);
continue; continue;
} }
@ -294,13 +295,16 @@ class Bouncer
$envs[$envKey] = $envVal; $envs[$envKey] = $envVal;
} }
} }
\Kint::dump($service['Spec']['TaskTemplate']['ContainerSpec']['Env']);
ksort($envs); ksort($envs);
// If there are no BOUNCER_* environment variables, skip this service. // If there are no BOUNCER_* environment variables, skip this service.
if (count($envs) == 0) { if (count($envs) == 0) {
$this->logger->debug('Service {service_name} has no BOUNCER_* environment variables, skipping.', ['emoji' => Emoji::warning() . ' Bouncer.php', 'service_name' => $service['Spec']['Name']]);
continue; continue;
} }
// if BOUNCER_IGNORE is set, skip this service. // if BOUNCER_IGNORE is set, skip this service.
if (isset($envs['BOUNCER_IGNORE'])) { if (isset($envs['BOUNCER_IGNORE'])) {
$this->logger->warning('Service {service_name} has BOUNCER_IGNORE set, skipping.', ['emoji' => Emoji::warning() . ' Bouncer.php', 'service_name' => $service['Spec']['Name']]);
continue; continue;
} }