Feature Request: Configurable Automatic Deployment History Retention

Abierto
#6,112 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
docker, nextjs, typescript
Área
backend, database

Línea de trabajo

Start by locating the existing removeLastTenDeployments function the issue names and the deployment-completion path that calls it. From there trace the schema and settings forms for Application and Docker Compose services, since the limit has to be stored per service, exposed in the UI, and default to 10. Done means a successful deployment prunes records beyond the configured limit, with old behaviour preserved when unset, plus a test covering the pruning count.

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

Descripción

enhancement
What problem will this feature address?

Currently, Dokploy automatically retains the latest 10 deployments per service. However, there is no way for users to configure this retention limit.

For production environments and applications that are deployed frequently, keeping 10 deployments may be unnecessary. It would be useful to configure a smaller retention limit, such as 3 deployments, to keep the Deployments page clean and avoid storing unnecessary historical deployment records.

Describe the solution you'd like

I would like Dokploy to provide a configurable automatic deployment retention setting.

Users should be able to specify how many of the latest deployments they want to retain per Application or Docker Compose service.

For example, configurable options could include:

  • Keep the latest 3 deployments.
  • Keep the latest 5 deployments.
  • Keep the latest 10 deployments (default).
  • Keep the latest 20 deployments.
  • Keep all deployments (disable automatic cleanup).

Expected behavior:

Whenever a new deployment completes successfully, Dokploy should automatically delete deployment records exceeding the configured retention limit, keeping only the newest deployments.

For example, if the retention limit is configured to 3:

  1. The first three deployments are retained.
  2. A fourth deployment completes successfully.
  3. The oldest deployment is automatically deleted.
  4. Only the three latest deployments remain visible in the Deployments section.

This should work automatically without requiring users to manually delete old deployments.

Describe alternatives you've considered

Currently, the only alternative is manually deleting old deployments through the Deployments section.

This is inconvenient, particularly for applications with frequent deployments, and does not provide a practical way to manage deployment history automatically according to individual requirements.

Additional context

I noticed that Dokploy already implements automatic deployment pruning through the removeLastTenDeployments function.

Rather than introducing an entirely new cleanup mechanism, it would be great to make the existing retention limit configurable.

Ideally, this setting could be available per Application or Docker Compose service, allowing different retention policies for different applications.

Suggested default: Keep the existing behavior of retaining the latest 10 deployments to ensure backward compatibility.

Will you send a PR to implement it?

Yes

Lenguaje dominante
TypeScript
Estrellas
38.8k
Forks
3.2k
Merge medio
1 d 10 h
PR fusionados (30 d)
110

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 Dokploy/dokploy

Todos los issues de Dokploy/dokploy

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.