Unusual disk space usage?

At first glance, this doesn’t strike me as a bug nor as a misconfiguration.

/srv/www/site_name/shared/source contains only the cloned files of your repo. Thus its size will correspond to the size of your repo’s files. I tested deploying the example project repo and I see that the shared/source file size is small and the shared/source/site size is trivial:

# repo size
$du -hs /srv/www/example.com/shared/source
2.3M   	/srv/www/example.com/shared/source

# bedrock-based site size (with sage theme)
$du -hs /srv/www/example.com/shared/source/site
440K   	/srv/www/example.com/shared/source/site

Your repo will be larger, with the 8 sites and a probably few committed theme files, but unless you’re committing your node_modules (and maybe dist), I can’t imagine these project files being too big.

What dir size do you get from du -hs /srv/www/example.com/shared/source? If it is extremely large, does your repo contain a ton of files or deps, and/or unusually large files?


You can delete the releases dir but I think that will break your site till you deploy again. To avoid downtime, you could just delete the inactive items within releases. You can see which is active:

$ ls -l /srv/www/example.com
lrwxrwxrwx 1 web www-data   44 Aug 28 17:42 current -> /srv/www/example.com/releases/20160828174203

You can adjust how many releases will be kept (default is 5) by specifying keep_releases with the “Finalize the deploy” task (credit):

 - name: Finalize the deploy
   deploy_helper:
     current_path: "{{ project_current_path }}"
     path: "{{ project_root }}"
     release: "{{ deploy_helper.new_release }}"
     state: finalize
+    keep_releases: 2
2 Likes