Skip to content

Commit 78790c0

Browse files
committed
Rebuild iko docs
1 parent ce40f01 commit 78790c0

File tree

2 files changed

+74
-8
lines changed

2 files changed

+74
-8
lines changed

iko/deploying/index.html

Lines changed: 73 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,36 @@
461461
</li>
462462

463463
<li class="md-nav__item">
464-
<a href="#3-run-the-deploy-on-the-remote-environment" class="md-nav__link">
464+
<a href="#3-set-the-target-connection" class="md-nav__link">
465465
<span class="md-ellipsis">
466-
3. Run the deploy on the remote environment
466+
3. Set the target connection
467467
</span>
468468
</a>
469469

470+
</li>
471+
472+
<li class="md-nav__item">
473+
<a href="#4-run-the-deployment" class="md-nav__link">
474+
<span class="md-ellipsis">
475+
4. Run the deployment
476+
</span>
477+
</a>
478+
479+
<nav class="md-nav" aria-label="4. Run the deployment">
480+
<ul class="md-nav__list">
481+
482+
<li class="md-nav__item">
483+
<a href="#do-i-need-network" class="md-nav__link">
484+
<span class="md-ellipsis">
485+
🤔 Do I need --network?
486+
</span>
487+
</a>
488+
489+
</li>
490+
491+
</ul>
492+
</nav>
493+
470494
</li>
471495

472496
</ul>
@@ -546,12 +570,36 @@
546570
</li>
547571

548572
<li class="md-nav__item">
549-
<a href="#3-run-the-deploy-on-the-remote-environment" class="md-nav__link">
573+
<a href="#3-set-the-target-connection" class="md-nav__link">
550574
<span class="md-ellipsis">
551-
3. Run the deploy on the remote environment
575+
3. Set the target connection
552576
</span>
553577
</a>
554578

579+
</li>
580+
581+
<li class="md-nav__item">
582+
<a href="#4-run-the-deployment" class="md-nav__link">
583+
<span class="md-ellipsis">
584+
4. Run the deployment
585+
</span>
586+
</a>
587+
588+
<nav class="md-nav" aria-label="4. Run the deployment">
589+
<ul class="md-nav__list">
590+
591+
<li class="md-nav__item">
592+
<a href="#do-i-need-network" class="md-nav__link">
593+
<span class="md-ellipsis">
594+
🤔 Do I need --network?
595+
</span>
596+
</a>
597+
598+
</li>
599+
600+
</ul>
601+
</nav>
602+
555603
</li>
556604

557605
</ul>
@@ -607,12 +655,30 @@ <h3 id="2-build-the-image">2. Build the image</h3>
607655
<p>Then push it to your container registry:</p>
608656
<div class="highlight"><pre><span></span><code>docker<span class="w"> </span>push<span class="w"> </span>ghcr.io/your-org/iko-with-migrations:latest
609657
</code></pre></div>
610-
<h3 id="3-run-the-deploy-on-the-remote-environment">3. Run the deploy on the remote environment</h3>
611-
<p>On the target server or inside your CI/CD pipeline, run:</p>
658+
<h3 id="3-set-the-target-connection">3. Set the target connection</h3>
659+
<p>Iko uses the <code>SQITCH_TARGET</code> environment variable to connect to your database.</p>
660+
<p>For example:</p>
661+
<div class="highlight"><pre><span></span><code><span class="nb">export</span><span class="w"> </span><span class="nv">SQITCH_TARGET</span><span class="o">=</span>db:pg://admin:secret@your-database-host/app
662+
</code></pre></div>
663+
<p>Alternatively, set it in your CI/CD system’s environment configuration.</p>
664+
<blockquote>
665+
<p>🛡️ Do not hardcode credentials into your Dockerfile or image. Use CI secrets
666+
or -e flags instead.</p>
667+
</blockquote>
668+
<h3 id="4-run-the-deployment">4. Run the deployment</h3>
669+
<p>From your CI/CD pipeline or target server, run:</p>
670+
<div class="highlight"><pre><span></span><code>docker<span class="w"> </span>run<span class="w"> </span>--rm<span class="w"> </span><span class="se">\</span>
671+
<span class="w"> </span>ghcr.io/your-org/iko-with-migrations:latest<span class="w"> </span>deploy<span class="w"> </span>--verify
672+
</code></pre></div>
673+
<h4 id="do-i-need-network">🤔 Do I need --network?</h4>
674+
<p>Only if your Postgres instance is running in Docker on the same machine.</p>
675+
<p>If so, and it's in a custom Docker network, use:</p>
612676
<div class="highlight"><pre><span></span><code>docker<span class="w"> </span>run<span class="w"> </span>--rm<span class="w"> </span><span class="se">\</span>
613-
<span class="w"> </span>-e<span class="w"> </span><span class="nv">PG_URI</span><span class="o">=</span>pg://user:pass@postgres/app<span class="w"> </span><span class="se">\</span>
677+
<span class="w"> </span>--network<span class="w"> </span>your-network<span class="w"> </span><span class="se">\</span>
614678
<span class="w"> </span>ghcr.io/your-org/iko-with-migrations:latest<span class="w"> </span>deploy<span class="w"> </span>--verify
615679
</code></pre></div>
680+
<p>Otherwise, for hosted databases (RDS, Cloud SQL, etc.) or Postgres installed on
681+
the host system, you don’t need a custom Docker network.</p>
616682

617683

618684

0 commit comments

Comments
 (0)