clusev/resources/views/livewire/help/content/en/commands.blade.php

57 lines
3.6 KiB
PHP

@php
$h = 'font-display text-base font-semibold text-ink';
$p = 'text-sm leading-relaxed text-ink-2';
$code = 'rounded bg-inset px-1.5 py-0.5 font-mono text-[12px] text-accent-text';
$cmd = 'block w-full overflow-x-auto rounded-md border border-line bg-void px-3 py-2 font-mono text-[12px] text-accent-text';
$real = 'mt-1 font-mono text-[11px] leading-relaxed text-ink-3';
@endphp
<div class="space-y-3">
<h3 class="{{ $h }}">Commands / CLI</h3>
<p class="{{ $p }}">The installer sets up the <code class="{{ $code }}">clusev</code> command on the host. It wraps the long Docker invocations you never need to remember the compose file or container names. SSH in and run <code class="{{ $code }}">clusev &lt;command&gt;</code> from anywhere. <code class="{{ $code }}">clusev help</code> prints the overview.</p>
</div>
<div class="space-y-4">
<div class="space-y-1">
<pre class="{{ $cmd }}">sudo clusev update</pre>
<p class="{{ $p }}">Pulls the latest release, rebuilds the image (including CSS/JS) and applies database migrations. Requires root (<code class="{{ $code }}">sudo</code>). Secrets and the configured domain are preserved; the panel is briefly unreachable for a minute or two.</p>
<p class="{{ $real }}"> runs <span class="text-ink-2">update.sh</span> (git pull + image rebuild + migrate)</p>
</div>
<div class="space-y-1">
<pre class="{{ $cmd }}">clusev reset-admin</pre>
<p class="{{ $p }}">Resets dashboard access: clears the second factor (2FA) so you can set a new password on the next login. Last resort when password and 2FA are both lost (see <span class="text-ink">Account recovery</span>).</p>
<p class="{{ $real }}"> <span class="text-ink-2">docker compose exec app php artisan clusev:reset-admin</span></p>
</div>
<div class="space-y-1">
<pre class="{{ $cmd }}">clusev restart</pre>
<p class="{{ $p }}">Restarts the stack (all containers) and applies configuration changes without rebuilding.</p>
<p class="{{ $real }}"> <span class="text-ink-2">docker compose up -d</span></p>
</div>
<div class="space-y-1">
<pre class="{{ $cmd }}">clusev logs</pre>
<p class="{{ $p }}">Follows the stack's live logs (handy for troubleshooting). Add a service name e.g. <code class="{{ $code }}">clusev logs app</code> for just that one. Ctrl-C stops.</p>
<p class="{{ $real }}"> <span class="text-ink-2">docker compose logs -f</span></p>
</div>
<div class="space-y-1">
<pre class="{{ $cmd }}">clusev ps</pre>
<p class="{{ $p }}">Shows which services are running (alias: <code class="{{ $code }}">clusev status</code>). A quick stack health check.</p>
<p class="{{ $real }}"> <span class="text-ink-2">docker compose ps</span></p>
</div>
<div class="space-y-1">
<pre class="{{ $cmd }}">clusev migrate</pre>
<p class="{{ $p }}">Applies pending database migrations. Normally <code class="{{ $code }}">clusev update</code> does this for you this is for the rare manual case.</p>
<p class="{{ $real }}"> <span class="text-ink-2">docker compose exec app php artisan migrate --force</span></p>
</div>
<div class="space-y-1">
<pre class="{{ $cmd }}">clusev artisan &lt;...&gt;</pre>
<p class="{{ $p }}">For advanced use: passes any artisan command through to the app container, e.g. <code class="{{ $code }}">clusev artisan about</code>.</p>
<p class="{{ $real }}"> <span class="text-ink-2">docker compose exec app php artisan &lt;...&gt;</span></p>
</div>
</div>