umgestellt auf Docker

This commit is contained in:
rxf
2025-09-20 16:01:52 +02:00
commit efe6ff4864
39 changed files with 2075 additions and 0 deletions

20
db_connection_docker.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
// Docker environment variables with fallbacks for local development
$host_name = $_ENV['DB_HOST'] ?? 'localhost';
$database = $_ENV['DB_NAME'] ?? 'rezepte_klaus';
$user_name = $_ENV['DB_USER'] ?? 'root';
$password = $_ENV['DB_PASS'] ?? '';
$link = new mysqli($host_name, $user_name, $password, $database);
if ($link->connect_error) {
die('<p>Verbindung zum MySQL Server fehlgeschlagen: '. $link->connect_error .'</p>');
}
?>