Skip to content

Commit b29b4df

Browse files
author
Exploding Labs Bot
committed
Update site from docs source repo
1 parent 196b0e8 commit b29b4df

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

superstack/bluegreen/index.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,9 @@
513513
</li>
514514

515515
<li class="md-nav__item">
516-
<a href="#5-add-a-front-proxy" class="md-nav__link">
516+
<a href="#5-add-a-proxy" class="md-nav__link">
517517
<span class="md-ellipsis">
518-
5. Add a Front Proxy
518+
5. Add a Proxy
519519
</span>
520520
</a>
521521

@@ -672,9 +672,9 @@
672672
</li>
673673

674674
<li class="md-nav__item">
675-
<a href="#5-add-a-front-proxy" class="md-nav__link">
675+
<a href="#5-add-a-proxy" class="md-nav__link">
676676
<span class="md-ellipsis">
677-
5. Add a Front Proxy
677+
5. Add a Proxy
678678
</span>
679679
</a>
680680

@@ -737,23 +737,23 @@ <h1>Blue/Green Deployments</h1>
737737
<ol>
738738
<li>A <code>blue</code> stack</li>
739739
<li>A <code>green</code> stack</li>
740-
<li>A front proxy to direct traffic</li>
740+
<li>A proxy to direct traffic</li>
741741
<li>An external Postgres.</li>
742742
</ol>
743743
<h2 id="2-adjust-caddy">2. Adjust Caddy</h2>
744744
<h3 id="name-the-caddy-containers">Name the Caddy containers</h3>
745-
<p>Naming the Caddy containers <code>blue_caddy</code> and <code>green_caddy</code> allows the front
745+
<p>Naming the Caddy containers <code>blue_caddy</code> and <code>green_caddy</code> allows the
746746
proxy to direct traffic to the correct stacks:</p>
747747
<div class="highlight"><span class="filename">compose.yaml</span><pre><span></span><code><span class="nt">caddy</span><span class="p">:</span>
748748
<span class="w"> </span><span class="nt">container_name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">${STACK_NAME}_caddy</span>
749749
</code></pre></div>
750750
<h3 id="remove-exposed-ports">Remove exposed ports</h3>
751-
<p>We'll no longer expose ports in the stacks, instead a front proxy will sit in
751+
<p>We'll no longer expose ports in the stacks, instead a proxy will sit in
752752
front of the two stacks, proxying to them.</p>
753753
<p>So remove the <code>caddy</code> service's <code>ports:</code> section in <code>compose.yaml</code>.</p>
754754
<h3 id="serve-http-only-in-the-stacks">Serve HTTP-only in the stacks</h3>
755755
<p>Set <code>CADDY_SITE_ADDRESS</code> to only <code>:80</code>, removing <code>:443</code> (leaving TLS
756-
termination to the front proxy):</p>
756+
termination to the proxy):</p>
757757
<div class="highlight"><span class="filename">compose.yaml</span><pre><span></span><code><span class="nt">caddy</span><span class="p">:</span>
758758
<span class="w"> </span><span class="nt">environment</span><span class="p">:</span>
759759
<span class="w"> </span><span class="nt">CADDY_SITE_ADDRESS</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">:80</span>
@@ -798,8 +798,8 @@ <h2 id="4-bring-up-two-stacks">4. Bring up two Stacks</h2>
798798
</code></pre></div>
799799
<p>Docker will use the directory name <code>green</code> as the project name, creating
800800
different containers, volumes and networks than the <code>blue</code> stack.</p>
801-
<h2 id="5-add-a-front-proxy">5. Add a Front Proxy</h2>
802-
<p>The <em>front proxy</em> is a single container that binds ports <code>80</code> and <code>443</code> on the
801+
<h2 id="5-add-a-proxy">5. Add a Proxy</h2>
802+
<p>The proxy is a single container that binds ports <code>80</code> and <code>443</code> on the
803803
server and routes requests into either the Blue or Green stack.</p>
804804
<p>On the server, create a simple <code>Caddyfile</code>:</p>
805805
<div class="highlight"><span class="filename">caddy/Caddyfile</span><pre><span></span><code>api.myapp.com {
@@ -828,7 +828,7 @@ <h2 id="flip-traffic">Flip traffic</h2>
828828
reverse_proxy green_caddy:80
829829
}
830830
</code></pre></div>
831-
<p>Reload the front proxy's config:</p>
831+
<p>Reload the proxy's config:</p>
832832
<div class="highlight"><pre><span></span><code>docker<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>front-proxy<span class="w"> </span>caddy<span class="w"> </span>reload
833833
</code></pre></div>
834834
<p>Cutover is instant. Green is now live, and Blue is the idle stack.</p>

0 commit comments

Comments
 (0)