feat: add stack reset helper and setup runbook

This commit is contained in:
Md Bayazid Bostame
2026-03-31 15:11:16 +02:00
parent 80cb7a409d
commit 541736a9a2
4 changed files with 141 additions and 0 deletions

View File

@@ -684,6 +684,22 @@ docker compose restart worker</code></pre>
<pre><code>./scripts/deploy_test_from_mac.sh</code></pre>
<p>Sync the current <code>develop</code> checkout to the LAN test server and deploy it.</p>
</div>
<div class="box">
<h3>Reset a stack from scratch</h3>
<pre><code>git checkout develop
RESET_CONFIRM=RESET EXPECTED_BRANCH=develop ./scripts/reset_stack_from_mac.sh</code></pre>
<p>Wipe the current test stack state and rebuild it with default bootstrap data.</p>
<pre><code>git checkout release/tubco-v1
RESET_CONFIRM=RESET \
EXPECTED_BRANCH=release/tubco-v1 \
DEPLOY_HOST=root@&lt;customer-host&gt; \
DEPLOY_PATH=/opt/workdock \
REMOTE_ENV_FILE=.env.prod \
HEALTH_URL=https://portal.tub.co/healthz/ \
RUN_DJANGO_CHECK=1 \
./scripts/reset_stack_from_mac.sh</code></pre>
<p>Use the second form for a customer setup from scratch. This is destructive and removes database/media/static/backups before bootstrapping again.</p>
</div>
<div class="box">
<h3>Production deployment</h3>
<pre><code>./scripts/deploy_prod_from_mac.sh</code></pre>