Files
flixcooks-website/maintenance/db-unavailable.php
T

53 lines
1.6 KiB
PHP
Raw Normal View History

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FlixCooks Datenbank nicht verfügbar</title>
<link rel="stylesheet" href="/assets/style.css">
<style>
body {
min-height: 100vh;
display: grid;
place-items: center;
padding: 2rem;
text-align: center;
}
.db-error-card {
max-width: 32rem;
padding: 2rem;
border-radius: var(--radius, 16px);
border: 1px solid var(--stroke, rgba(255,255,255,0.12));
background: var(--surface-2, rgba(255,255,255,0.04));
}
.db-error-card h1 { margin-top: 0; }
.db-error-card code {
display: block;
margin: 1rem 0;
padding: 0.75rem;
font-size: 0.85rem;
text-align: left;
word-break: break-all;
background: rgba(0,0,0,0.2);
border-radius: 8px;
}
</style>
</head>
<body>
<div class="db-error-card">
<h1>Datenbank nicht verfügbar</h1>
<p>FlixCooks benötigt eine laufende PostgreSQL-Verbindung. Ohne Datenbank werden keine Rezepte angezeigt.</p>
<?php if (!empty($dbError)): ?>
<code><?php echo htmlspecialchars($dbError, ENT_QUOTES, 'UTF-8'); ?></code>
<?php endif; ?>
<p><strong>Lokal prüfen:</strong></p>
<ol style="text-align: left; margin: 0 auto; max-width: 22rem;">
<li><code>DATABASE_URL</code> in <code>.env</code> setzen</li>
<li><code>docker compose -f docker-compose.dev.yml up -d</code></li>
<li><code>php scripts/db-check.php</code></li>
<li>Leere DB: <code>php scripts/db-seed.php</code></li>
</ol>
</div>
</body>
</html>