Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set release limit while using php-deployer?

I am using PHP deployer 6.6.0 to deploy Laravel based websites.

Every time I deploy it creates a new release. Currently, I have more than 10 releases and it's eating up a lot of disk space.

I don't want to keep more than the last 3 releases and need the older releases to automatically roll over.

How can I specify the maximum number of releases to be kept?

like image 592
surendar Avatar asked Dec 11 '19 03:12

surendar


1 Answers

The option you want is called keep_releases. See the docs here.

(Link points to V6 docs, since currently V7 docs fail to mention this setting. Although I see it mentioned on this upgrade guide, so I assume it still works).

By default, deployer keeps only 5 releases, so if you have more than 10 it means you changed the default configuration.

You'll probably have set('keep_releases', -1); in your configuration. Change it, so it stores only a reasonable number of releases, or delete the line directly and it will only keep 5 releases around.

set('keep_releases', 3); // e.g. for a maximum of 3 releases
like image 122
yivi Avatar answered Oct 08 '22 03:10

yivi