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

Offen Anfängerfreundlich
#9,013 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
83/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
docker, docker-compose, postgresql

Rechercherichtung

Öffne docker-compose.yml im Repository-Stammverzeichnis und finde die Service-Definitionen von postgres, flagsmith und flagsmith-task-processor; keine von ihnen enthält einen Schlüssel restart:. Füge restart: unless-stopped zu jedem der drei Services hinzu und führe dann docker compose config aus, um zu bestätigen, dass die Datei weiterhin geparst wird und die Richtlinie bei allen drei erscheint. Erledigt bedeutet, dass ein docker compose up -d gefolgt von einem Docker/Host-Neustart alle drei Container ohne manuelles Eingreifen zurückbringt. Das Pinning der Image-Tags und das Postgres-Bump im selben Bericht sind getrennte Anliegen und sollten in eigene Issues aufgeteilt werden, statt in diese Änderung einfließen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
7.4k
Forks
613
Ø Merge
1 T. 11 Std.
Gemergte PRs (30 T.)
144

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Flagsmith/flagsmith

Alle Issues in Flagsmith/flagsmith

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.