54 lines
2 KiB
Text
54 lines
2 KiB
Text
@page
|
|
@model PlanTempusAdmin.Pages.Setup.IndexModel
|
|
@{
|
|
ViewData["Title"] = "Setup";
|
|
}
|
|
|
|
<div class="page-header">
|
|
<h1 class="page-title">Setup</h1>
|
|
<p class="page-subtitle">Scripts og konfiguration til servere</p>
|
|
</div>
|
|
|
|
<div class="status-grid">
|
|
<a href="/Setup/Scripts" class="status-item" style="text-decoration: none; color: inherit;">
|
|
<div class="status-label">Scripts</div>
|
|
<div class="status-value">Bash</div>
|
|
<p style="margin-top: 8px; font-size: 11px; color: var(--foreground);">Backup scripts til Ubuntu servere</p>
|
|
</a>
|
|
<a href="/Setup/Database" class="status-item" style="text-decoration: none; color: inherit;">
|
|
<div class="status-label">Database</div>
|
|
<div class="status-value">SQL</div>
|
|
<p style="margin-top: 8px; font-size: 11px; color: var(--foreground);">PostgreSQL schema og migrations</p>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="card mt-2">
|
|
<div class="card-header">Hurtig Guide</div>
|
|
<div class="card-body">
|
|
<h3 style="margin-bottom: 12px;">1. Database Setup</h3>
|
|
<p>Kør SQL scriptet fra <a href="/Setup/Database">Database</a> siden på din PostgreSQL server.</p>
|
|
|
|
<h3 style="margin: 16px 0 12px;">2. Azure CLI Setup</h3>
|
|
<p>Installer Azure CLI på serveren:</p>
|
|
<pre><code>curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
|
|
az --version</code></pre>
|
|
|
|
<h3 style="margin: 16px 0 12px;">3. Backup Script</h3>
|
|
<p>Download scriptet fra <a href="/Setup/Scripts">Scripts</a> siden og placer det på serveren.</p>
|
|
<pre><code># Placer script
|
|
sudo mkdir -p /opt/backup
|
|
sudo cp forgejo-backup.sh /opt/backup/
|
|
sudo chmod +x /opt/backup/forgejo-backup.sh
|
|
|
|
# Opret .env fil med konfiguration
|
|
sudo nano /opt/backup/.env</code></pre>
|
|
|
|
<h3 style="margin: 16px 0 12px;">4. Cron Job</h3>
|
|
<p>Tilføj daglig backup via cron:</p>
|
|
<pre><code># Rediger crontab
|
|
sudo crontab -e
|
|
|
|
# Tilføj linje (kører kl. 02:00 hver nat)
|
|
0 2 * * * /opt/backup/forgejo-backup.sh >> /var/log/forgejo-backup.log 2>&1</code></pre>
|
|
</div>
|
|
</div>
|