chore: add dual-remote helper workflow

This commit is contained in:
Md Bayazid Bostame
2026-03-31 12:26:11 +02:00
parent 89cc11e41e
commit 8f61e43e9b
3 changed files with 152 additions and 0 deletions

View File

@@ -94,6 +94,17 @@
<li>promote <code>develop</code> into <code>main</code> when stable</li>
</ol>
</div>
<div class="box">
<h3>Dual remote rule</h3>
<ul>
<li><code>origin</code> is the normal product remote on GitHub.</li>
<li><code>tubco</code> is the customer remote for TUBCO only.</li>
<li>Normal day-to-day work continues on <code>origin</code>.</li>
<li>Push to <code>tubco</code> only when you explicitly want to update the customer branch.</li>
</ul>
<pre><code>./scripts/git_remote_target.sh status</code></pre>
<p>Use the helper above before pushing if there is any doubt about which remote should receive the change.</p>
</div>
<div class="box">
<h3>Customer release branches</h3>
<p>Use a dedicated release branch when a customer should receive the current stable product line but not future features by default.</p>
@@ -657,6 +668,8 @@ lxc.mount.entry: /dev/null sys/module/apparmor/parameters/enabled none bind 0 0<
<pre><code>docker compose restart web
docker compose restart worker</code></pre>
<p>Restart app services after code or template changes.</p>
<pre><code>./scripts/git_remote_target.sh status</code></pre>
<p>Show the current branch, active local identity, and both remotes before pushing.</p>
</div>
<div class="box">
<h3>Validation</h3>
@@ -675,6 +688,15 @@ docker compose restart worker</code></pre>
<pre><code>./scripts/deploy_prod_from_mac.sh</code></pre>
<p>Sync the current <code>main</code> checkout to the production target and deploy it with production checks enabled.</p>
</div>
<div class="box">
<h3>Remote targeting</h3>
<pre><code>./scripts/git_remote_target.sh push-origin
./scripts/git_remote_target.sh push-tubco release/tubco-v1</code></pre>
<p>Push to the intended remote explicitly instead of relying on memory.</p>
<pre><code>./scripts/git_remote_target.sh set-own-identity
./scripts/git_remote_target.sh set-tubco-identity</code></pre>
<p>Switch between the normal commit identity and the TUBCO customer identity when needed.</p>
</div>
<div class="box">
<h3>Direct server deployment</h3>
<pre><code>cd /opt/workdock