|
450 | 450 | </span> |
451 | 451 | </a> |
452 | 452 |
|
| 453 | + <nav class="md-nav" aria-label="📦 3. Deploy the Compose File"> |
| 454 | + <ul class="md-nav__list"> |
| 455 | + |
| 456 | + <li class="md-nav__item"> |
| 457 | + <a href="#4-secrets" class="md-nav__link"> |
| 458 | + <span class="md-ellipsis"> |
| 459 | + 4. Secrets |
| 460 | + </span> |
| 461 | + </a> |
| 462 | + |
| 463 | +</li> |
| 464 | + |
| 465 | + </ul> |
| 466 | + </nav> |
| 467 | + |
453 | 468 | </li> |
454 | 469 |
|
455 | 470 | <li class="md-nav__item"> |
456 | | - <a href="#4-launch-your-stack" class="md-nav__link"> |
| 471 | + <a href="#5-launch-your-stack" class="md-nav__link"> |
457 | 472 | <span class="md-ellipsis"> |
458 | | - 🚀 4. Launch your Stack |
| 473 | + 🚀 5. Launch your Stack |
459 | 474 | </span> |
460 | 475 | </a> |
461 | 476 |
|
|
564 | 579 | </span> |
565 | 580 | </a> |
566 | 581 |
|
| 582 | + <nav class="md-nav" aria-label="📦 3. Deploy the Compose File"> |
| 583 | + <ul class="md-nav__list"> |
| 584 | + |
| 585 | + <li class="md-nav__item"> |
| 586 | + <a href="#4-secrets" class="md-nav__link"> |
| 587 | + <span class="md-ellipsis"> |
| 588 | + 4. Secrets |
| 589 | + </span> |
| 590 | + </a> |
| 591 | + |
| 592 | +</li> |
| 593 | + |
| 594 | + </ul> |
| 595 | + </nav> |
| 596 | + |
567 | 597 | </li> |
568 | 598 |
|
569 | 599 | <li class="md-nav__item"> |
570 | | - <a href="#4-launch-your-stack" class="md-nav__link"> |
| 600 | + <a href="#5-launch-your-stack" class="md-nav__link"> |
571 | 601 | <span class="md-ellipsis"> |
572 | | - 🚀 4. Launch your Stack |
| 602 | + 🚀 5. Launch your Stack |
573 | 603 | </span> |
574 | 604 | </a> |
575 | 605 |
|
@@ -622,17 +652,20 @@ <h2 id="3-deploy-the-compose-file">📦 3. Deploy the Compose File</h2> |
622 | 652 | <p>Copy <code>compose.yaml</code> to the server:</p> |
623 | 653 | <div class="highlight"><pre><span></span><code>scp<span class="w"> </span>compose.yaml<span class="w"> </span>youruser@yourserver: |
624 | 654 | </code></pre></div> |
625 | | -<h2 id="4-launch-your-stack">🚀 4. Launch your Stack</h2> |
| 655 | +<h3 id="4-secrets">4. Secrets</h3> |
| 656 | +<p>Docker needs your secrets (passwords, keys, etc.). There are a few options:</p> |
| 657 | +<ol> |
| 658 | +<li>Write secrets to a <code>.env</code> file on the server (convenient but not very |
| 659 | + secure).</li> |
| 660 | +<li>Set env vars in the the <code>docker compose</code> command (be sure to disable shell |
| 661 | + history).</li> |
| 662 | +<li>Use environment injection in your CI/CD.</li> |
| 663 | +</ol> |
| 664 | +<h2 id="5-launch-your-stack">🚀 5. Launch your Stack</h2> |
626 | 665 | <p>SSH into your server and bring up the stack:</p> |
627 | 666 | <div class="highlight"><pre><span></span><code>docker<span class="w"> </span>compose<span class="w"> </span>pull |
628 | 667 | docker<span class="w"> </span>compose<span class="w"> </span>up<span class="w"> </span>-d |
629 | 668 | </code></pre></div> |
630 | | -<p>Docker compose needs secrets, so you have a few options:</p> |
631 | | -<ol> |
632 | | -<li>Write secrets to a <code>.env</code> file in plain-text (be sure to <code>chmod 600 .env</code>).</li> |
633 | | -<li>Set env vars in the docker compose command</li> |
634 | | -<li>Alternatively, use environment injection in your CI/CD.</li> |
635 | | -</ol> |
636 | 669 | <hr /> |
637 | 670 | <p>That’s it — your backend is live.</p> |
638 | 671 | <p>If this is the first time bringing up your stack, the migrations will run |
|
0 commit comments