|
426 | 426 | <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> |
427 | 427 |
|
428 | 428 | <li class="md-nav__item"> |
429 | | - <a href="#1-set-your-image-names" class="md-nav__link"> |
| 429 | + <a href="#1-prepare-your-images" class="md-nav__link"> |
430 | 430 | <span class="md-ellipsis"> |
431 | | - ✅ 1. Set Your Image Names |
| 431 | + ✅ 1. Prepare your Images |
432 | 432 | </span> |
433 | 433 | </a> |
434 | 434 |
|
|
518 | 518 | <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> |
519 | 519 |
|
520 | 520 | <li class="md-nav__item"> |
521 | | - <a href="#1-set-your-image-names" class="md-nav__link"> |
| 521 | + <a href="#1-prepare-your-images" class="md-nav__link"> |
522 | 522 | <span class="md-ellipsis"> |
523 | | - ✅ 1. Set Your Image Names |
| 523 | + ✅ 1. Prepare your Images |
524 | 524 | </span> |
525 | 525 | </a> |
526 | 526 |
|
|
573 | 573 |
|
574 | 574 |
|
575 | 575 | <h1 id="deploying-to-remote-environments">☁️ Deploying to Remote Environments</h1> |
576 | | -<p>SuperStack is Docker-native, so deployment is simple and portable. Here's |
577 | | -how to deploy it to a remote server.</p> |
578 | | -<h2 id="1-set-your-image-names">✅ 1. Set Your Image Names</h2> |
579 | | -<p>Change the image names to your own (e.g. using your Docker Hub or GitHub |
580 | | -Container Registry account) in <code>compose.yaml</code>, for example:</p> |
581 | | -<div class="highlight"><pre><span></span><code><span class="nt">postgres</span><span class="p">:</span> |
582 | | -<span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ghcr.io/youruser/yourapp-postgres</span> |
583 | | -<span class="nt">caddy</span><span class="p">:</span> |
| 576 | +<p>SuperStack is Docker-native, so deployment is simple and portable. Here's how |
| 577 | +to deploy it to a remote server.</p> |
| 578 | +<p>A clear goal of SuperStack is that <strong>only <code>compose.yaml</code> should be required on |
| 579 | +the remote server</strong>. No other file should need to be copied there.</p> |
| 580 | +<h2 id="1-prepare-your-images">✅ 1. Prepare your Images</h2> |
| 581 | +<p>For services that are built, add <code>image:</code> URIs to your own container repository |
| 582 | +(e.g. your Docker Hub or GitHub Container Registry account), for example:</p> |
| 583 | +<div class="highlight"><span class="filename">compose.yaml</span><pre><span></span><code><span class="nt">caddy</span><span class="p">:</span> |
584 | 584 | <span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ghcr.io/youruser/yourapp-caddy</span> |
| 585 | + |
| 586 | +<span class="nt">postgres</span><span class="p">:</span> |
| 587 | +<span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ghcr.io/youruser/yourapp-postgres</span> |
585 | 588 | </code></pre></div> |
586 | 589 | <h2 id="2-build-and-push-your-images">🛠️ 2. Build and Push your Images</h2> |
587 | 590 | <p>Build your images locally and push to your registry:</p> |
588 | 591 | <div class="highlight"><pre><span></span><code>docker<span class="w"> </span>compose<span class="w"> </span>build |
589 | 592 | docker<span class="w"> </span>compose<span class="w"> </span>push |
590 | 593 | </code></pre></div> |
591 | 594 | <h2 id="3-deploy-the-compose-file">📦 3. Deploy the Compose File</h2> |
592 | | -<p>The only file needed for SuperStack to work on the remote server is |
593 | | -<code>compose.yaml</code>.</p> |
| 595 | +<p>Only <code>compose.yaml</code> is required on the remote server.</p> |
594 | 596 | <p>Copy it to your server:</p> |
595 | 597 | <div class="highlight"><pre><span></span><code>scp<span class="w"> </span>compose.yaml<span class="w"> </span>youruser@yourserver: |
596 | 598 | </code></pre></div> |
597 | 599 | <h2 id="4-launch-your-stack">🚀 4. Launch your Stack</h2> |
598 | 600 | <p>SSH into your server and bring up the stack.</p> |
599 | 601 | <p>For production, avoid using <code>.env</code> files. Instead, set secrets directly:</p> |
600 | | -<div class="highlight"><pre><span></span><code><span class="nv">CADDY_PORT</span><span class="o">=</span><span class="m">80</span><span class="w"> </span><span class="se">\</span> |
| 602 | +<blockquote> |
| 603 | +<p>💡 Avoid leaking secrets by disabling shell history.</p> |
| 604 | +</blockquote> |
| 605 | +<div class="highlight"><span class="filename">.env</span><pre><span></span><code><span class="nv">JWT_SECRET</span><span class="o">=</span>your-secret<span class="w"> </span><span class="se">\</span> |
| 606 | +<span class="nv">CADDY_PORT</span><span class="o">=</span><span class="m">80</span><span class="w"> </span><span class="se">\</span> |
601 | 607 | <span class="nv">PG_USER</span><span class="o">=</span>admin<span class="w"> </span><span class="se">\</span> |
602 | 608 | <span class="nv">PG_PASS</span><span class="o">=</span>supersecret<span class="w"> </span><span class="se">\</span> |
603 | 609 | <span class="nv">POSTGREST_AUTHENTICATOR_PASS</span><span class="o">=</span>supersecret<span class="w"> </span><span class="se">\</span> |
604 | | -<span class="nv">JWT_SECRET</span><span class="o">=</span>your-secret<span class="w"> </span><span class="se">\</span> |
605 | 610 | docker<span class="w"> </span>compose<span class="w"> </span>up<span class="w"> </span>-d |
606 | 611 | </code></pre></div> |
607 | | -<blockquote> |
608 | | -<p>💡 Avoid leaking secrets by disabling shell history.</p> |
609 | | -</blockquote> |
610 | 612 | <p>Alternatively, use environment injection in your CI/CD.</p> |
611 | 613 | <hr /> |
612 | 614 | <p>That’s it — your backend is live.</p> |
|
0 commit comments