Commit Graph

569 Commits

Author SHA1 Message Date
Mauricio Siu
edcfc7d670 Add shebang to backup command script in utils.ts
- Introduced a shebang line to the backup command script for improved compatibility and execution in a bash environment.
- This change enhances the script's portability and ensures it runs correctly in various shell contexts.
2025-05-05 02:09:03 -06:00
Mauricio Siu
d8f12f1780 Update Dockerfile to include rsync and refactor backup command in web-server.ts
- Added `rsync` to the Dockerfile for improved file synchronization capabilities.
- Refactored the backup command in `web-server.ts` to use `rsync` instead of `cp`, enhancing error handling and performance during filesystem copying.
2025-05-04 22:19:24 -06:00
Mauricio Siu
44af0ec975 Refactor Gitea repository fetching to handle pagination
- Updated the `testGiteaConnection` and `getGiteaRepositories` functions to implement pagination when fetching repositories from the Gitea API, ensuring all repositories are retrieved.
- Enhanced error handling for API responses and improved the structure of the returned repository data.
- Removed deprecated code related to direct repository fetching, streamlining the overall logic.
2025-05-04 21:03:31 -06:00
Mauricio Siu
eb5ba2f219 Enhance compose removal process by adding network disconnection command
- Updated the `removeCompose` function to include a command for disconnecting the Docker network before removing the stack or compose application, improving cleanup reliability.
- Removed unnecessary console logging in the `getServiceImageDigest` function to streamline output and enhance code clarity.
2025-05-04 16:50:03 -06:00
Mauricio Siu
9aa56870b0 Update deployment and backup components for improved handling and user experience
- Refined the `ShowDeployments` component to conditionally render `CancelQueues` and `RefreshToken` based on deployment type, enhancing flexibility.
- Removed unnecessary console logging in `RestoreBackup` and updated input field to disable when the database type is "web-server", improving user guidance.
- Enhanced logging in `runWebServerBackup` to provide clearer output during backup operations, ensuring better traceability of actions.
2025-05-04 13:19:45 -06:00
Mauricio Siu
e09447d4b4 Add ShowDeploymentsModal component and refactor ShowDeployments for enhanced deployment handling
- Introduced `ShowDeploymentsModal` component to manage deployment logs and details in a modal interface.
- Updated `ShowDeployments` to accept `serverId` and `refreshToken` props, allowing for more flexible deployment data handling.
- Refactored API queries in `ShowDeployments` to utilize a unified query for fetching deployments by type, improving code efficiency.
- Replaced instances of `ShowSchedulesLogs` with `ShowDeploymentsModal` in relevant components to streamline deployment log access.
2025-05-04 12:58:46 -06:00
Mauricio Siu
d6f5f6e6cb Refactor backup and command execution utilities for improved robustness
- Removed unnecessary console logging in the backup scheduling utility to streamline output.
- Updated container ID retrieval to handle potential null values gracefully, enhancing error handling.
- Modified command execution logging to use single quotes for consistency and improved readability.
2025-05-04 03:42:55 -06:00
Mauricio Siu
96b1df2199 Enhance backup scheduling interface and logging
- Updated the backup scheduling form to include a tooltip explaining cron expression format and examples, improving user guidance.
- Integrated a selection component for predefined cron expressions, allowing users to choose or enter custom schedules more easily.
- Added logging for backup details in the server utility to aid in debugging and monitoring backup schedules.
2025-05-04 03:31:51 -06:00
Mauricio Siu
614b9d25a8 Implement restore functionality for various database types
- Added `apiRestoreBackup` schema to define input requirements for restore operations.
- Refactored restore utilities for PostgreSQL, MySQL, MariaDB, and MongoDB to utilize a unified command generation approach, enhancing maintainability.
- Improved logging during restore processes to provide clearer feedback on command execution and success/failure states.
- Streamlined the handling of database credentials and backup file paths across different database types, ensuring consistency and reducing redundancy.
2025-05-04 03:25:58 -06:00
Mauricio Siu
66dd890448 Enhance backup command generation and logging for database backups
- Refactored backup utilities for PostgreSQL, MySQL, MariaDB, and MongoDB to streamline command generation and improve logging.
- Introduced a unified `getBackupCommand` function to encapsulate backup command logic, enhancing maintainability.
- Improved error handling and logging during backup processes, providing clearer feedback on command execution and success/failure states.
- Updated container retrieval methods to return null instead of throwing errors when no containers are found, improving robustness.
2025-05-04 00:15:09 -06:00
Mauricio Siu
557c89ac6d Enhance backup logging and error handling in web server backup utility
- Added detailed logging for PostgreSQL container retrieval and command execution, improving traceability during backup processes.
- Updated success and error messages to provide clearer feedback on backup operations, including specific command outputs and error details.
- Ensured proper stream handling for logging messages, enhancing the overall robustness of the backup utility.
2025-05-03 13:41:19 -06:00
Mauricio Siu
b3e2af3b40 Remove unused backup utility and refactor service container retrieval
- Deleted the `createBackupLabels` function from the backup utilities as it was no longer needed.
- Removed the `getServiceContainerIV2` function from the Docker utilities and updated references to use the existing `getServiceContainer` function, streamlining the codebase and improving maintainability.
2025-05-03 13:36:49 -06:00
Mauricio Siu
a8159e5f99 Implement enhanced backup logging and deployment tracking for database backups
- Refactored backup utilities for MariaDB, MongoDB, MySQL, and PostgreSQL to include detailed logging of command execution, improving traceability and debugging.
- Introduced deployment tracking for backups, allowing for better management of backup statuses and notifications.
- Updated backup command execution to utilize writable streams, ensuring efficient data handling during backup processes.
- Enhanced error handling and logging for backup operations, providing clearer feedback on success or failure.
2025-05-03 13:33:37 -06:00
Mauricio Siu
89306a7619 Refactor backup and restore utilities for improved container handling
- Removed the `getRemoteServiceContainer` function and updated the `getServiceContainer` function to handle both local and remote service containers more efficiently.
- Refactored backup and restore commands for MariaDB, MongoDB, MySQL, and PostgreSQL to utilize new utility functions for generating backup and restore commands, enhancing code clarity and maintainability.
- Streamlined command execution logic in backup and restore processes, ensuring consistent handling of container IDs across different database types.
2025-05-03 13:24:05 -06:00
Mauricio Siu
0690f07262 Enhance backup validation and improve backup display
- Added validation to require a service name for compose backups in the backup handling logic, improving user feedback.
- Refactored the ShowBackups component to sort deployments by creation date and enhance the display of backup information, including service names and statuses, for better user experience.
- Updated logging in the compose backup utility to include command execution details, aiding in debugging and monitoring.
2025-05-03 12:59:22 -06:00
Mauricio Siu
e437903ef8 Enhance backup and deployment features
- Updated the RestoreBackupSchema to require serviceName for compose backups, improving validation and user feedback.
- Refactored the ShowBackups component to include deployment information, enhancing the user interface and experience.
- Introduced new SQL migration files to add backupId to the deployment table and appName to the backup table, improving data relationships and integrity.
- Enhanced deployment creation logic to support backup deployments, ensuring better tracking and management of backup processes.
- Improved backup and restore utility functions to streamline command execution and error handling during backup operations.
2025-05-03 12:39:52 -06:00
Mauricio Siu
50aeeb2fb8 Refactor backup management and enhance database schema
- Updated the ShowBackups component to improve layout and user experience by adding a minimum height and centering content when no backups are available.
- Removed the outdated SQL file `0089_dazzling_marrow.sql` and replaced it with a new schema file `0089_eminent_winter_soldier.sql` that introduces new columns and types for the `backup` table, enhancing data structure.
- Updated the journal and snapshot metadata to reflect the new schema changes and maintain consistency in the database structure.
- Adjusted the service component layout to accommodate new grid configurations for better responsiveness.
2025-05-03 09:58:50 -06:00
Mauricio Siu
d85fc2e513 Merge branch 'canary' into 187-backups-for-docker-compose 2025-05-03 09:48:24 -06:00
Mauricio Siu
ccb141339b Enhance schedule management and job handling features
- Updated the scheduleRouter to manage job scheduling and removal based on the enabled status of schedules, improving job lifecycle management.
- Refactored the scheduleJob and removeJob utilities to support scheduling and removing jobs for both server and schedule types.
- Introduced a new schema for jobQueue to accommodate schedule jobs, enhancing the flexibility of job definitions.
- Improved the runJobs function to execute scheduled jobs based on their enabled status, ensuring proper execution of active schedules.
- Enhanced the initialization process for schedules to automatically schedule active jobs from the database, streamlining the setup process.
2025-05-03 00:54:01 -06:00
Mauricio Siu
a5fb5532fd Update drizzle-zod dependency and enhance deployment tracking features
- Downgraded the drizzle-zod package from version 0.7.1 to 0.5.1 for compatibility.
- Added new fields `startedAt` and `finishedAt` to the deployment schema to track deployment timing.
- Enhanced deployment creation logic to set `startedAt` and `finishedAt` timestamps during deployment processes.
- Improved the ShowDeployments and ShowSchedulesLogs components to display deployment duration using a new Badge component.
- Refactored deployment removal logic to streamline the process of cleaning up old deployments.
2025-05-03 00:12:49 -06:00
Mauricio Siu
43ab1aa7b8 Enhance ShowSchedules component with improved user feedback and schedule execution
- Updated the ShowSchedules component to include a delay before refetching schedules after a successful manual run, enhancing user experience by providing a brief confirmation period.
- Removed unnecessary console logging in the updateSchedule function to streamline the code and improve maintainability.
- Modified the scheduleJob utility to accept scheduleId as the first parameter, improving clarity and consistency in job scheduling.
2025-05-02 23:11:21 -06:00
Mauricio Siu
3072795232 Enhance schedule initialization and management features
- Introduced a new `initSchedules` function to initialize and schedule active schedules from the database, improving the management of scheduled tasks.
- Updated the `createSchedule` and `updateSchedule` functions to handle scheduling jobs based on the enabled status of schedules, ensuring proper job management.
- Refactored the `removeScheduleJob` utility to cancel existing scheduled jobs, enhancing the flexibility of schedule updates.
- Improved the `HandleSchedules` and `ShowSchedules` components by removing unused imports and enhancing the user interface for better clarity and usability.
2025-05-02 23:05:39 -06:00
Mauricio Siu
98d0f1d5bf Enhance schedule management with new fields and improved components
- Introduced new fields in the schedule schema: `serviceName`, `scheduleType`, and `script`, allowing for more flexible schedule configurations.
- Updated the `HandleSchedules` component to incorporate the new fields, enhancing user input options for schedule creation and updates.
- Refactored the `ShowSchedules` component to support the new `scheduleType` and display relevant information based on the selected type.
- Improved API handling for schedule creation and updates to accommodate the new fields, ensuring proper validation and error handling.
- Added a new `ShowSchedulesModal` component for better integration of schedule viewing in server settings, enhancing user experience.
2025-05-02 20:17:21 -06:00
Mauricio Siu
2c90103823 Update schedule management with shell type support and version upgrades
- Updated the `drizzle-zod` package to version 0.7.1 across the project for enhanced schema validation.
- Introduced a new `shellType` column in the `schedule` schema to specify the shell used for executing commands, defaulting to 'bash'.
- Enhanced the `HandleSchedules` component to include the new `shellType` field, allowing users to select the shell type when creating or updating schedules.
- Updated the `runCommand` utility to utilize the selected shell type when executing commands, improving flexibility in command execution.
- Refactored the API to accommodate the new `shellType` in schedule creation and updates, ensuring proper handling of the new field.
2025-05-02 15:56:40 -06:00
Mauricio Siu
f2bb01c800 Add schedule logs feature and enhance schedule management
- Introduced a new component `ShowSchedulesLogs` to display logs for each schedule, allowing users to view deployment logs associated with their schedules.
- Updated the `ShowSchedules` component to integrate the new logs feature, providing a button to access logs for each schedule.
- Enhanced the `schedule` schema by adding an `appName` column to better identify applications associated with schedules.
- Updated the API to support fetching deployments with their associated schedules, improving data retrieval for the frontend.
- Implemented utility functions for managing schedule-related operations, including creating and removing deployments linked to schedules.
2025-05-02 04:29:32 -06:00
Mauricio Siu
442f051457 Add 'enabled' field to schedule management
- Introduced a new boolean field `enabled` in the `schedule` schema to indicate the active status of schedules.
- Updated the `HandleSchedules` component to include a toggle switch for enabling/disabling schedules.
- Enhanced the `ShowSchedules` component to display the status of each schedule with a badge indicating whether it is enabled or disabled.
- Added a new API mutation to run schedules manually, ensuring proper error handling for non-existent schedules.
- Updated database schema to reflect the new `enabled` field with a default value of true.
2025-05-02 03:45:07 -06:00
Mauricio Siu
e84ce38994 Add scheduleId to deployment schema and establish foreign key relationship
- Introduced a new column `scheduleId` in the `deployment` table to link deployments with schedules.
- Added a foreign key constraint on `scheduleId` referencing the `schedule` table, ensuring referential integrity.
- Updated the `deployment` schema to include the new relationship with the `schedules` table.
- Enhanced the `schedules` schema to establish a one-to-many relationship with deployments.
2025-05-02 03:27:35 -06:00
Mauricio Siu
d4064805eb Add schedule management features
- Implemented `HandleSchedules` component for creating and updating schedules with validation.
- Added `ShowSchedules` component to display a list of schedules with options to edit and delete.
- Created API routes for schedule management including create, update, delete, and list functionalities.
- Defined the `schedule` table schema in the database with necessary fields and relationships.
- Integrated schedule management into the application service dashboard, allowing users to manage schedules directly from the UI.
2025-05-02 03:21:13 -06:00
Mauricio Siu
d853b1d326 Enhance server package exports to support ES module and CommonJS formats. Update main entry point and include compose backup utility in utils for improved backup functionality. 2025-05-01 20:37:54 -06:00
Mauricio Siu
25f3980492 Remove unnecessary console logs from backup and restore compose functions to improve code cleanliness and maintainability. 2025-05-01 20:28:20 -06:00
Mauricio Siu
8ba4ac22cc Enhance domain validation feedback in ShowDomains and AddDomain components. Add descriptive tooltips for container port input and improve validation state messaging to indicate Cloudflare status. Remove unnecessary console logs for cleaner code. 2025-04-30 01:23:54 -06:00
Mauricio Siu
77b1ec4733 Add DnsHelperModal component for DNS configuration guidance and integrate it into ShowDomainsCompose. Enhance domain validation functionality with server IP checks and improve UI with tooltips for better user experience. 2025-04-30 01:08:08 -06:00
Mauricio Siu
24f3be3c00 Add HandleBackup component to manage backup creation and updates, replacing the deprecated UpdateBackup component. Integrate dynamic form handling for various database types and metadata requirements. Update ShowBackups to utilize HandleBackup for both creating and updating backups, enhancing the user interface for better backup management. 2025-04-29 21:47:55 -06:00
Mauricio Siu
5055994bd3 Enhance RestoreBackup component to support compose backups by adding a database type selection and metadata handling. Update related API routes and schemas to accommodate new backup types, ensuring flexibility for various database configurations. Modify UI components to allow dynamic input for service names and database credentials based on the selected database type. 2025-04-28 02:17:42 -06:00
Mauricio Siu
ddcb22dff9 Implement support for compose backups in runJobs function. Enhance backup handling by checking server status and executing runComposeBackup for compose database types. Update backup structure to include compose details. 2025-04-27 23:12:11 -06:00
Mauricio Siu
77d7dc1f22 Enhance backup functionality by adding support for compose backups in various components. Update ShowBackups to clarify backup update requirements, modify initCronJobs to include compose backups, and improve logging for backup scheduling. Additionally, ensure that the scheduleBackup function retains the latest backups for compose types and document the addition of domains and backups in the Docker compose process. 2025-04-27 23:09:39 -06:00
Mauricio Siu
19bf4f27b6 Update UpdateBackup component to enforce DatabaseType casting for backup databaseType. Modify backups schema to allow optional metadata field, enhancing flexibility for various database types. 2025-04-27 23:06:38 -06:00
Mauricio Siu
6b9765a26c Refactor backup components to utilize a unified DatabaseType type. Update AddBackup and UpdateBackup components to handle database type selection for compose backups. Enhance UI to allow users to select database types dynamically. Update backup schema to include databaseType field for better metadata management. 2025-04-27 23:00:26 -06:00
Mauricio Siu
7c2eb63625 Implement metadata handling for database and compose backups. Update backup schemas to include metadata fields for various database types. Enhance backup creation and update processes to accommodate new metadata requirements. Modify UI components to support metadata input for different database types during backup operations. 2025-04-27 22:14:06 -06:00
Mauricio Siu
2ea2605ab1 Enhance backup functionality by introducing support for compose backups. Update backup schema to include serviceName and backupType fields. Modify related components to handle new backup types and integrate service selection for compose backups. Update API routes and database schema accordingly. 2025-04-27 20:17:49 -06:00
Mauricio Siu
7ae3ff22ee
Merge pull request #1613 from TheoD02/feat/github-triggerType
Some checks failed
Auto PR to main when version changes / create-pr (push) Has been cancelled
Build Docker images / build-and-push-cloud-image (push) Has been cancelled
Build Docker images / build-and-push-schedule-image (push) Has been cancelled
Build Docker images / build-and-push-server-image (push) Has been cancelled
Dokploy Docker Build / docker-amd (push) Has been cancelled
Dokploy Docker Build / docker-arm (push) Has been cancelled
autofix.ci / format (push) Has been cancelled
Dokploy Monitoring Build / docker-amd (push) Has been cancelled
Dokploy Monitoring Build / docker-arm (push) Has been cancelled
Dokploy Docker Build / combine-manifests (push) Has been cancelled
Dokploy Docker Build / generate-release (push) Has been cancelled
Dokploy Monitoring Build / combine-manifests (push) Has been cancelled
feat(github): add triggerType field to GitHub provider and handle tag creation events
2025-04-27 18:43:28 -06:00
Mauricio Siu
dc03ba73b3 Merge branch 'main' into canary 2025-04-26 23:29:51 -06:00
Mauricio Siu
91bcd1238f Refactor triggerType implementation: remove old SQL triggerType column definitions and replace with ENUM type in application and compose tables. Update shared schema to include triggerType enum. 2025-04-26 21:14:30 -06:00
Mauricio Siu
120646c77b Merge branch 'canary' into feat/github-triggerType 2025-04-26 21:09:23 -06:00
Mauricio Siu
b4aeb6577e Refactor notification sending in Dokploy restart process to include error handling for Discord, Gotify, Telegram, and Slack notifications. 2025-04-26 17:25:10 -06:00
Mauricio Siu
6518407c0c
Merge pull request #1563 from yusoofsh/add-disable-recurse-submodules-option
Add option to disable recurse submodules
2025-04-26 16:52:05 -06:00
Mauricio Siu
5d25de13dd Merge branch 'canary' into fix-mount-update 2025-04-26 16:44:49 -06:00
Mauricio Siu
5611dcccfd refactor(mount): enhance updateMount function with transaction handling and improved error management 2025-04-26 16:44:40 -06:00
Mauricio Siu
ceb16ae9f7 Implement enableSubmodules feature across various Git provider components and update database schema. This change introduces a new boolean field enableSubmodules to control submodule behavior in Git operations, replacing the previous recurseSubmodules field. Updates include modifications to the UI components, API routers, and database schema to accommodate this new feature. 2025-04-26 16:35:02 -06:00
Mauricio Siu
1911b5b674 Merge branch 'canary' into add-disable-recurse-submodules-option 2025-04-26 16:10:59 -06:00