code it los
All checks were successful
Deploy / deploy (push) Successful in 15s

This commit is contained in:
2026-05-15 22:27:49 +02:00
parent 98dd388fda
commit 752d33e38a
13 changed files with 1577 additions and 4 deletions

13
config/config.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
require_once __DIR__ . '/domaindata.php';
$host = $_SERVER['HTTP_HOST'] ?? '';
$isCli = PHP_SAPI === 'cli';
$isStagingHost = is_string($host) && str_starts_with($host, 'staging.');
$envDir = $isStagingHost ? __DIR__ . '/staging' : __DIR__ . '/prod';
require_once $envDir . '/config.php';

19
config/db.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
$pdo = null;
if (!defined('APP_ENV')) {
return;
}
$dbLoader = __DIR__ . '/' . APP_ENV . '/db.php';
// The prototype should run without a database. Explicit opt-in keeps the
// current concept environment usable while the data layer is still evolving.
$enableDb = getenv('APP_ENABLE_DB') === '1';
if ($enableDb && is_file($dbLoader)) {
require_once $dbLoader;
}

View File

@@ -3,7 +3,7 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require_once __DIR__ . "/domaindata.php";
require_once dirname(__DIR__) . "/domaindata.php";
// Umgebung (optional, aber hilfreich für Debugging / Logik)
define('APP_ENV', 'prod'); // oder 'prod', 'local', ...
@@ -31,4 +31,3 @@ define('MATOMO_SITE_ID', 7);
$env = 'prod';
$baseUrl = 'https://'.APP_DOMAIN_NAME;
$apiBaseUrl = 'https://api.'.APP_DOMAIN_NAME;

View File

@@ -3,7 +3,7 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require_once __DIR__ . "/domaindata.php";
require_once dirname(__DIR__) . "/domaindata.php";
// Umgebung (optional, aber hilfreich für Debugging / Logik)
define('APP_ENV', 'staging'); // oder 'prod', 'local', ...
@@ -33,4 +33,3 @@ define('MATOMO_ENABLED', false);
define('MATOMO_SITE_ID', 8);
$baseUrl = 'https://'.APP_DOMAIN_PRIMARY;
$apiBaseUrl = 'https://api.'.APP_DOMAIN_PRIMARY;