feat: Add FTP, SFTP, and Google Drive backup destination types via rclone#1455
Open
brs7gd4r88-creator wants to merge 28 commits intoCortexFlow-AI:mainfrom
Open
feat: Add FTP, SFTP, and Google Drive backup destination types via rclone#1455brs7gd4r88-creator wants to merge 28 commits intoCortexFlow-AI:mainfrom
brs7gd4r88-creator wants to merge 28 commits intoCortexFlow-AI:mainfrom
Conversation
When editing a notification, only the notification.all query cache was invalidated. The notification.one query retained stale data, causing the edit form to display previous values on subsequent edits.
…imports in auth-client and auth modules
…ion-cache-on-edit fix: invalidate notification.one query cache on update
…auth chore: update better-auth dependencies to version 1.5.4 and refactor …
…s in components - Introduced new test files for permission checks, including `check-permission.test.ts`, `enterprise-only-resources.test.ts`, `resolve-permissions.test.ts`, and `service-access.test.ts`. - Implemented permission checks in various components to ensure actions are gated by user permissions, including `ShowTraefikConfig`, `UpdateTraefikConfig`, `ShowVolumes`, `ShowDomains`, and others. - Enhanced the logic for displaying UI elements based on user permissions, ensuring that only authorized users can access or modify resources.
…h new definitions - Deleted the old SQL files for organization_role and audit_log. - Introduced new SQL file defining organization_role and audit_log with updated foreign key constraints and indexes. - Updated metadata snapshots to reflect the new table structures and relationships. - Adjusted access control permissions for backup and notification operations to include update capabilities.
- Replaced the delete operation with an update for organization roles, ensuring existing roles are modified instead of removed. - Adjusted the return value to reflect the updated role instead of a newly created entry. - Reintroduced the audit logging functionality for role updates.
feat: add comprehensive permission tests and enhance permission check…
- Added new components for displaying and managing audit logs, including a data table and filters for user actions. - Introduced a custom roles management interface, allowing users to create and modify roles with specific permissions. - Updated permission checks to ensure proper access control for audit logs and custom roles. - Refactored existing components to integrate new functionality and improve user experience.
…-submit fix: prevent Watch Paths tooltip button from submitting the form
- Replaced direct state checks with a derived variable `isCollapsed` for better readability and maintainability. - Updated class names and conditions in the SidebarLogo component to use the new `isCollapsed` variable. - Adjusted overflow behavior in Sidebar and SidebarContent components for improved layout management.
- Removed TimeBadge from the ShowProjects component and integrated it into the BreadcrumbSidebar. - Added a query to determine if the environment is cloud-based, allowing for conditional display of the TimeBadge. - Updated layout in BreadcrumbSidebar for improved spacing and organization.
…tate-has-usability-and-visual-issues 3979 collapsed sidebar state has usability and visual issues
- Updated MariaDB, MongoDB, MySQL, PostgreSQL, and Redis schemas to include an optional dockerImage field for enhanced configuration flexibility.
…ker-image-reset-to-default-for-any-unrelated-change feat: add optional dockerImage field to database schemas
- Updated the rsync command in the runWebServerBackup function to exclude the 'volume-backups/' directory, ensuring that unnecessary data is not copied during the backup process.
…backup-file-size-increase-500-kb-4-gb-overnight fix: exclude volume-backups from web server backup rsync command
- Updated the mechanizeDockerContainer function to conditionally use authConfig when creating a Docker service, ensuring proper service creation based on authentication settings.
…eploy-to-swarm-worker-fails-with-unauthorized-no-such-image-retry-succeeds fix: handle optional authConfig in mechanizeDockerContainer function
…n-off fix(volume-backups): restart container before S3 upload in volume backup
…lone Resolves CortexFlow-AI#168 Previously, Dokploy only supported S3-compatible storage as backup destinations. This change adds support for FTP, SFTP, and Google Drive destinations using rclone, which already ships with Dokploy. Changes: - Added 'destinationType' enum (s3, ftp, sftp, google-drive) to destination schema - Added new DB columns for FTP/SFTP (host, port, user, password, path, SSH key path) and Google Drive (clientId, clientSecret, refreshToken, folderId) - Created getRcloneFlags() and getRcloneRemotePath() helpers that generate the correct rclone flags/paths based on destination type - Updated all backup runners (postgres, mysql, mariadb, mongo, compose, web-server), all restore functions, and volume backup/restore to use the new destination-agnostic helpers - Updated the destination router's testConnection to support all destination types - Updated frontend form with destination type selector and conditional fields per type - Updated destination list UI to display the destination type badge - Added DB migration (0150_add_destination_types.sql) - Made S3-specific columns nullable for non-S3 destinations (backward compatible)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #168 — Adds support for FTP, SFTP, and Google Drive as backup destination types, in addition to the existing S3-compatible storage.
Motivation
Previously Dokploy only supported S3-compatible storage for backups. Many users need to back up to FTP/SFTP servers or Google Drive. Since rclone (which already ships with Dokploy) supports all these protocols, we can leverage it to add multi-destination support with minimal additional dependencies.
Changes
Schema & Database
destinationTypeenum:s3,ftp,sftp,google-drivedestinationtable:ftpHost,ftpPort,ftpUser,ftpPassword,ftpPath,sftpKeyPathgoogleDriveClientId,googleDriveClientSecret,googleDriveRefreshToken,googleDriveFolderIdaccessKey,secretAccessKey,bucket,region,endpoint) nullable for non-S3 destinations0150_add_destination_types.sqlBackend
getRcloneFlags(destination)— returns the correct rclone CLI flags based on destination typegetRcloneRemotePath(destination, subPath)— returns the correct rclone remote path (e.g.,:s3:,:ftp:,:sftp:,:drive:)testConnectionin the destination router to test all destination typesFrontend
Backward Compatibility
destinationType = 's3'via the column defaultgetS3Credentialsfunction is preserved for any external consumersTesting