<?php
//OpenID (aus ENV, mit Fallbacks auf bisherige Werte)
$oidc_provider = getenv('OIDC_PROVIDER') ?: 'https://auth.o-byte.com/realms/o-byte.com';
$oidc_client   = getenv('OIDC_CLIENT')   ?: 'qa-tool';
$oidc_secret   = getenv('OIDC_SECRET')   ?: 'vuTWMfJybjg9yCn9awxBUUIxqqHTj35O';

// DocBee (aus ENV, mit Fallbacks auf bisherige Werte)
$docbee_baseurl = getenv('DOCBEE_BASEURL') ?: 'https://obyte.docbee.com';
$docbee_user    = getenv('DOCBEE_USER')     ?: 'OBYTE/service';
$docbee_pass    = getenv('DOCBEE_PASS')     ?: 'mBG9ZrC*fh@*co';
$docbee_time    = getenv('DOCBEE_TIME')     ?: '1440';

/**
 * App-Basis-URL aus ENV (Fallback auf lokale IP:8009)
 * Beispiel: http://192.168.1.112:8009  oder  https://qa.o-byte.team
 */
$APP_BASE_URL = getenv('APP_BASE_URL') ?: 'http://192.168.1.112:8009';
$APP_BASE_URL = rtrim($APP_BASE_URL, '/'); // sauber ohne trailing slash

/** Ableiten der Redirect-URL für OIDC (login.php / callback.php) */
$OIDC_REDIRECT_URL = $APP_BASE_URL . '/callback.php';



// Database (from ENV)
$db_host = getenv('DB_HOST') ?: 'mariadb';
$db_port = getenv('DB_PORT') ?: '3306';
$db_name = getenv('DB_NAME') ?: 'qa_tool';
$db_user = getenv('DB_USER') ?: 'qa';
$db_pass = getenv('DB_PASS') ?: '';
$pdf_storage_dir = rtrim(getenv('PDF_STORAGE_DIR') ?: '/var/reports', '/');
if (!is_dir($pdf_storage_dir)) { @mkdir($pdf_storage_dir, 0775, true); }



