# 本番サイトを壊さない、最も安全なブランチは何ですか？

**URL:** https://meta.discourse.org/t/what-s-the-best-safest-branch-not-break-production-site/297025
**Category:** Self-hosting
**Created:** [2024 年 2 月 28 日午前 6:30 UTC](https://meta.discourse.org/t/what-s-the-best-safest-branch-not-break-production-site/297025 "2024-02-28T06:30:11Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![CGenie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cgenie/32/366188_2.png) [@CGenie](https://meta.discourse.org/u/CGenie)
#### Post date: [2024 年 2 月 28 日午前 6:30 UTC](https://meta.discourse.org/t/what-s-the-best-safest-branch-not-break-production-site/297025/1 "2024-02-28T06:30:11Z")

</div>

これは些細な質問かもしれませんが、答えが見つかりませんでした。安全なアップデートのデフォルトブランチは何であるべきですか？`main` ブランチの問題によるランダムな障害で本番サーバーを壊したくありません。最新のタグに従うだけでよいでしょうか？つまり、現在は `v3.2.0` ですか？

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2024 年 2 月 28 日午前 6:51 UTC](https://meta.discourse.org/t/what-s-the-best-safest-branch-not-break-production-site/297025/2 "2024-02-28T06:51:09Z")

</div>

こんにちは、@CGenie さん、ようこそ:slight\_smile:

ほとんどの人はデフォルトの `tests-passed` ブランチを使用していると思いますが、`beta` や `stable` を使用する人もいます。違いについては、[Configure a supported tracking branch to get Discourse software updates](https://meta.discourse.org/t/configure-a-supported-tracking-branch-to-get-discourse-software-updates/17014) にもう少し情報があります。

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2024 年 2 月 28 日午前 7:00 UTC](https://meta.discourse.org/t/what-s-the-best-safest-branch-not-break-production-site/297025/3 "2024-02-28T07:00:11Z")

</div>

[Understanding Discourse release channels](https://meta.discourse.org/t/why-does-discourse-always-install-beta-versions-by-default/264400) も違いについて説明しています。

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2024 年 2 月 28 日午前 7:59 UTC](https://meta.discourse.org/t/what-s-the-best-safest-branch-not-break-production-site/297025/4 "2024-02-28T07:59:31Z")

</div>

私の意見では、答えは `stable` です。これは、コードの大部分を大幅に変更することなく、マイナーなバグ修正とセキュリティパッチを受け取るため、通常は各パッチへのアップグレードを通じて互換性が高くなります。

欠点は、マイナーバージョンを将来的に `3.3.0` に引き上げる場合、小出しではなく「一度に」対処する必要がある、より大きな変更が伴う可能性があることです。これは、前のマイナーバージョンを念頭に置いて構築されたカスタムプラグインなどに特に影響を与える可能性がありますが、新しい `3.3.x` シリーズのベータリリースではテストされていません。

総合的に見て、最新の機能を見逃しても気にならないのであれば、`stable` をお勧めします。

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2024 年 2 月 28 日午前 8:03 UTC](https://meta.discourse.org/t/what-s-the-best-safest-branch-not-break-production-site/297025/5 "2024-02-28T08:03:44Z")

</div>

`tests-passed`であっても、新しい機能を確認する時間があるまで、自分のアップデートを管理し、延期できると思います（必要であればステージングサイトで）。

---

<div class="post-metadata">

### Author: ![CGenie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cgenie/32/366188_2.png) [@CGenie](https://meta.discourse.org/u/CGenie)
#### Post date: [2024 年 2 月 28 日午前 8:34 UTC](https://meta.discourse.org/t/what-s-the-best-safest-branch-not-break-production-site/297025/6 "2024-02-28T08:34:27Z")

</div>

OK、またくだらない質問ですが：サーバーのデプロイに`discourse_docker`を使用しています。`discourse`は`main`ブランチでセットアップされているようです。これを`tests-passed`に変更するにはどうすればよいですか？

---

<div class="post-metadata">

### Author: ![CGenie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cgenie/32/366188_2.png) [@CGenie](https://meta.discourse.org/u/CGenie)
#### Post date: [2024 年 2 月 28 日午前 8:36 UTC](https://meta.discourse.org/t/what-s-the-best-safest-branch-not-break-production-site/297025/7 "2024-02-28T08:36:26Z")

</div>

ああ、わかりました。`containers/app.yml` の `version` はデフォルトで `tests-passed` になっています。これは、安定性と新機能のバランスが取れた妥当な設定ということでしょうか？

---

<div class="post-metadata">

### Author: ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)
#### Post date: [2024 年 2 月 28 日午前 8:44 UTC](https://meta.discourse.org/t/what-s-the-best-safest-branch-not-break-production-site/297025/8 "2024-02-28T08:44:19Z")

</div>

> [@merefield](#):
>
> 私の意見では、答えは `stable` です。

その通りです。これは、大規模なフォーラムをセルフホストで運用した数年間の経験に基づいています。ベータ版やテスト済み版は修正や新機能がより速く提供されますが、安定版は予測可能です。

メジャーな変更（バージョンアップグレード）が発生する時期を知っており、バージョン間では変更がマイナーであることを知っています。これにより、自身のリソースを計画し、必要なテスト作業や、カスタマイズ（カスタムテーマなど）の潜在的な破損に備えることができます。
