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

Abierto Apto para principiantes
#9,013 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
83/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
docker, docker-compose, postgresql

Línea de trabajo

Abre docker-compose.yml en la raíz del repositorio y busca las definiciones de los servicios postgres, flagsmith y flagsmith-task-processor; ninguna de ellas tiene una clave restart:. Añade restart: unless-stopped a cada uno de los tres servicios y luego ejecuta docker compose config para confirmar que el archivo sigue parseándose y que la política aparece en los tres. Hecho significa que un docker compose up -d seguido de un reinicio de Docker/host devuelve los tres contenedores sin intervención manual. La fijación de las etiquetas de imagen y la actualización de Postgres en el mismo informe son asuntos separados y deberían dividirse en sus propios issues en lugar de incorporarse a este cambio.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
7.4k
Forks
613
Merge medio
1 d 11 h
PR fusionados (30 d)
144

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Flagsmith/flagsmith

Todos los issues de Flagsmith/flagsmith

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.