prepare intranet for first Dokploy deployment

This commit is contained in:
2026-08-26 12:59:51 +02:00
parent 5cfe688bdc
commit 29dfb85fef
1321 changed files with 227234 additions and 0 deletions
@@ -0,0 +1,27 @@
<?php
require_once __DIR__ . '/runtime_env.php';
$host = intranet_env('DB_HOST');
$port = intranet_env('DB_PORT', '5432');
$dbname = intranet_env('DB_NAME');
$username = intranet_env('DB_USER');
$password = intranet_env('DB_PASSWORD');
try {
$pdo = new PDO(
"pgsql:host={$host};port={$port};dbname={$dbname}",
$username,
$password,
[
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
]
);
} catch (PDOException $e) {
error_log('Database connection failed: ' . $e->getMessage());
http_response_code(500);
exit('Database connection failed.');
}
return $pdo;