docker-compose.yml has no restart policy, so a host reboot leaves self-hosted installs down

オープン 初心者向け
#9,013 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
83/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker, docker-compose, postgresql

調査の方向性

リポジトリルートの docker-compose.yml を開き、postgres、flagsmith、flagsmith-task-processor のサービス定義を見つけてください。それらのどれにも restart: キーはありません。3 つのサービスそれぞれに restart: unless-stopped を追加し、その後 docker compose config を実行して、ファイルが引き続きパースされ、ポリシーが 3 つすべてに表示されることを確認してください。完了とは、docker compose up -d の後に Docker/ホストを再起動すると、手動介入なしで 3 つのコンテナすべてが戻ることを意味します。同じレポート内のイメージタグの固定と Postgres のバンプは別個の関心事であり、この変更に折り込むのではなく、それぞれ独自の issue に分割すべきです。

索引モデルが issue の本文から書いたものです。

説明

Following the self-hosting steps in the README on a clean Ubuntu 26.04 box (4 cores, 3.8 GB memory, Docker 29.7.2), the stack came up on the first try in about 8 minutes, nearly all of it download. Dashboard, /health and the task processor all returned 200.

Then I stopped and started the machine.

Postgres, flagsmith and flagsmith-task-processor all stayed down until I ran docker compose up -d by hand. None of the three services in docker-compose.yml sets a restart: policy, so Docker does not bring them back.

On a self-hosted customer's server this matters more than it does locally. A routine reboot for a kernel security update takes Flagsmith down, and it stays down until somebody notices and logs in. The flags keep serving from SDK cache for a while, which makes it quieter and therefore worse.

Suggested fix: restart: unless-stopped on postgres, flagsmith and flagsmith-task-processor.

Two smaller things I hit in the same install, happy to split them out if you would rather have separate issues:

  1. The images are tagged latest (docker.flagsmith.com/flagsmith/flagsmith:latest). The one I pulled had been built 13 hours earlier. Two customers who install a week apart end up on different versions, with no version to roll back to or to quote in a support ticket. Pinning a release tag in the compose file, plus a line on how to upgrade, would fix that.

  2. postgres:15.5-alpine is pinned to a November 2023 release. Later 15.x minors carry security fixes.

Happy to open a PR for the restart policy if that is useful.

主要言語
Python
スター
7.4k
フォーク
613
平均マージ
1日 11時間
マージ済み PR(30日)
144

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Flagsmith/flagsmith のほかの issue

Flagsmith/flagsmith の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。