refactor(deployment): Remove WireGuard VPN dependency and restore public service access
Remove WireGuard integration from production deployment to simplify infrastructure: - Remove docker-compose-direct-access.yml (VPN-bound services) - Remove VPN-only middlewares from Grafana, Prometheus, Portainer - Remove WireGuard middleware definitions from Traefik - Remove WireGuard IPs (10.8.0.0/24) from Traefik forwarded headers All monitoring services now publicly accessible via subdomains: - grafana.michaelschiemer.de (with Grafana native auth) - prometheus.michaelschiemer.de (with Basic Auth) - portainer.michaelschiemer.de (with Portainer native auth) All services use Let's Encrypt SSL certificates via Traefik.
This commit is contained in:
78
tests/debug/generate-comparison-qrcode.php
Normal file
78
tests/debug/generate-comparison-qrcode.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
||||
|
||||
use App\Framework\QrCode\QrCodeGenerator;
|
||||
use App\Framework\QrCode\QrCodeRenderer;
|
||||
use App\Framework\QrCode\ValueObjects\ErrorCorrectionLevel;
|
||||
use App\Framework\QrCode\ValueObjects\QrCodeConfig;
|
||||
use App\Framework\QrCode\ValueObjects\QrCodeVersion;
|
||||
use App\Framework\QrCode\ValueObjects\EncodingMode;
|
||||
use App\Framework\QrCode\ValueObjects\QrCodeStyle;
|
||||
|
||||
echo "=== Generate Comparison QR Code ===\n\n";
|
||||
|
||||
// Generate with exact same parameters as problematic SVG
|
||||
// SVG shows: 580x580 canvas, 20px modules, 80px quiet zone (4 modules)
|
||||
$config = new QrCodeConfig(
|
||||
version: QrCodeVersion::fromNumber(1),
|
||||
errorCorrectionLevel: ErrorCorrectionLevel::M,
|
||||
encodingMode: EncodingMode::BYTE
|
||||
);
|
||||
|
||||
// Try different test data
|
||||
$testDataSets = [
|
||||
'HELLO WORLD',
|
||||
'HELLO',
|
||||
'A',
|
||||
'12345',
|
||||
'https://example.com',
|
||||
];
|
||||
|
||||
foreach ($testDataSets as $testData) {
|
||||
echo "=== Testing with: '{$testData}' ===\n";
|
||||
|
||||
try {
|
||||
$matrix = QrCodeGenerator::generate($testData, $config);
|
||||
|
||||
// Render with matching parameters
|
||||
$style = QrCodeStyle::large(); // 20px modules, 4 module quiet zone
|
||||
$renderer = new QrCodeRenderer();
|
||||
$svg = $renderer->renderCustom($matrix, $style, false);
|
||||
|
||||
// Save
|
||||
$filename = preg_replace('/[^a-zA-Z0-9]/', '_', $testData);
|
||||
$filepath = __DIR__ . "/test-qrcodes/test-{$filename}.svg";
|
||||
file_put_contents($filepath, $svg);
|
||||
|
||||
echo "✅ Generated: {$filepath}\n";
|
||||
echo " Matrix size: {$matrix->getSize()}x{$matrix->getSize()}\n";
|
||||
|
||||
// Check canvas size
|
||||
if (preg_match('/width="(\d+)" height="(\d+)"/', $svg, $matches)) {
|
||||
echo " Canvas size: {$matches[1]}x{$matches[2]}\n";
|
||||
if ((int)$matches[1] === 580) {
|
||||
echo " ✅ Canvas size matches problematic SVG\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
|
||||
} catch (\Exception $e) {
|
||||
echo "❌ Error: " . $e->getMessage() . "\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "=== Summary ===\n";
|
||||
echo "All test QR codes generated with:\n";
|
||||
echo " - Canvas: 580x580px\n";
|
||||
echo " - Module size: 20px\n";
|
||||
echo " - Quiet zone: 80px (4 modules)\n";
|
||||
echo "\n";
|
||||
echo "Try scanning these QR codes to see if any work.\n";
|
||||
echo "If they all work, the issue is with the data in the problematic SVG.\n";
|
||||
echo "If none work, there might be a systematic issue.\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user