You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>When scripting, the <code>iko</code> part is left out. For example, <code>iko create_schema api</code> becomes simply <code>create_schema api</code>. In this document the <code>iko</code> command is
1038
+
left out.</p>
1033
1039
<h2id="ad-hoc-migrations">Ad-hoc migrations</h2>
1034
1040
<blockquote>
1035
1041
<p>📖 Refer to <ahref="https://sqitch.org/docs/manual/sqitch-add/">sqitch-add</a>.</p>
Copy file name to clipboardExpand all lines: iko/deploying/index.html
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -628,18 +628,21 @@
628
628
629
629
<h1id="deploying-migrations-to-remote-environments">🚀 Deploying Migrations to Remote Environments</h1>
630
630
<p>Iko runs inside a container, so to deploy migrations to a remote environment
631
-
(like staging or production), you’ll need to include your migration scripts
632
-
inside a custom Docker image.</p>
631
+
(like staging or production), build a custom Docker image containing your
632
+
migration scripts.</p>
633
633
<p>This guide explains how to build and use that image.</p>
634
634
<hr/>
635
635
<h2id="why-use-a-custom-image">✅ Why use a custom image?</h2>
636
-
<p>The standard Iko CLI uses <code>docker run</code> with a local <code>migrations/</code> directory mounted into the container. This works great locally, but in remote environments:</p>
636
+
<p>The standard Iko CLI uses <code>docker run</code> with a local <code>migrations/</code> directory
637
+
mounted into the container. This works great locally, but in remote
638
+
environments:</p>
637
639
<ul>
638
640
<li>There's no local <code>migrations/</code> directory to mount.</li>
639
641
<li>There’s no Git repository cloned.</li>
640
642
<li>You want repeatable, portable deploys — not manual file copying.</li>
641
643
</ul>
642
-
<p>By building a Docker image that <em>includes</em> your migrations, you ensure the container is fully self-contained and deployable anywhere.</p>
644
+
<p>By building a Docker image that <em>includes</em> your migrations, you ensure the
645
+
container is fully self-contained and deployable anywhere.</p>
643
646
<hr/>
644
647
<h2id="step-by-step-build-and-deploy">🧱 Step-by-Step: Build and Deploy</h2>
645
648
<h3id="1-create-a-dockerfile">1. Create a Dockerfile</h3>
@@ -650,10 +653,10 @@ <h3 id="1-create-a-dockerfile">1. Create a Dockerfile</h3>
650
653
<p>This copies your migrations into the image at /repo, where Iko expects them.</p>
651
654
<h3id="2-build-the-image">2. Build the image</h3>
652
655
<p>Give it a meaningful tag, e.g. for production:</p>
0 commit comments