/// <summary> /// Do not deploy applications if we are short on disk space. /// /// Throws an exception if size is below minSize /// </summary> /// <param name="minSize">Defaults to 500Mb</param> protected void CheckDiskSpace(long minSize = 524288000) { var applicationPath = this.GlobalSettings.GetDefaultApplicationStorage().path; long freeSpaceBytes = UtilsSystem.GetTotalFreeSpace(applicationPath); if (freeSpaceBytes < minSize) { throw new Exception($"Insuficient storage [{UtilsSystem.BytesToString(freeSpaceBytes)}] to run deployments in: {applicationPath}"); } }