Feature Request: Configurable Automatic Deployment History Retention

Aperta
#6,112 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, nextjs, typescript
Ambito
backend, database

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
38.8k
Fork
3.2k
Merge medio
1g 10h
PR unite (30g)
110

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Dokploy/dokploy

Tutte le issue di Dokploy/dokploy

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.