Feature Request: Configurable Automatic Deployment History Retention

オープン
#6,112 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker, nextjs, typescript
領域
backend, database

調査の方向性

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.

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

説明

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

主要言語
TypeScript
スター
38.8k
フォーク
3.2k
平均マージ
1日 10時間
マージ済み PR(30日)
110

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

Dokploy/dokploy のほかの issue

Dokploy/dokploy の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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