Commit Graph

516 Commits

Author SHA1 Message Date
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
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
Mauricio Siu
461d7c530a fix(restore): streamline container ID retrieval for database operations
Refactor the database restore process to consistently use a single container ID for the PostgreSQL container. This change enhances reliability by ensuring that commands are executed against the correct container, preventing potential errors from multiple matches.

Co-authored-by: Merloss 54235902+Merloss@users.noreply.github.com
2025-04-26 16:07:50 -06:00
Mauricio Siu
ade4b8dd1b
Merge pull request #1749 from malko/template-helpers
Template helpers: Enhanced JWT generation
2025-04-26 16:00:06 -06:00
Mauricio Siu
f49a67f8df refactor(jwt generation): Simplify payload property assignments and secret initialization 2025-04-26 01:50:26 -06:00
autofix-ci[bot]
c3986d7a08
[autofix.ci] apply automated fixes 2025-04-26 07:40:07 +00:00
autofix-ci[bot]
79d55d8d34
[autofix.ci] apply automated fixes 2025-04-25 08:17:18 +00:00
Alexander Sjösten
d4c6e5b048 build: update nixpacks to 1.35.0 2025-04-25 09:58:52 +02:00
Mauricio Siu
4e5b5f219e fix(auth): update invite link host to use app.dokploy.com 2025-04-25 01:41:03 -06:00
Jonathan Gotti
d0dbc1837f feat(template-helpers): Add timestamps and timestampms helpers 2025-04-21 16:05:08 +02:00
Jonathan Gotti
2b5af1897f fix(template-helpers): hash not working without parameter 2025-04-21 16:04:00 +02:00
Jonathan Gotti
11b9cee73d feat(template-helpers): Add more parameters to jwt helper
- jwt without parameter now generate a real jwt
- keep length parameter as is for backward compatibility
- add secret and payload parameters
- payload properties iss, iat, exp are automaticly set if not provided
2025-04-21 16:00:16 +02:00
Barış DEMİRCİ
8d28a50a17 fix(backup): handle multiple container IDs in backup command
Ensure only one container ID is used when running `docker exec` for pg_dump to avoid errors caused by multiple matching containers.

Fixes INTERNAL_SERVER_ERROR from backup.manualBackupWebServer path.

Co-authored-by: Merloss 54235902+Merloss@users.noreply.github.com
2025-04-20 12:14:41 +00:00
Yusoof Moh
b7bf09bf21
Merge remote-tracking branch 'upstream/canary' into add-disable-recurse-submodules-option 2025-04-19 15:27:13 +07:00
Mauricio Siu
e14f2780af
Merge pull request #1656 from lorenzomigliorero/support-multiple-gitlab-groups
feat(gitlab): add support for multiple group names with a single provider
2025-04-17 02:20:29 -06:00
Mauricio Siu
33ab87f3db fix(gitlab): enhance group name matching logic to support multiple names
- Updated the group name check to allow for a comma-separated list of names, improving flexibility in group name validation.
2025-04-17 02:20:03 -06:00
Mauricio Siu
8e8bc3e71e Enhance PostgreSQL backup command in web server utility
- Added error handling to check for the existence of the PostgreSQL container before executing the backup command.
- Updated the backup command to use the retrieved container ID, ensuring the command runs correctly.
2025-04-17 01:58:25 -06:00
Mauricio Siu
7d7f2b4b1f
Merge pull request #1692 from ron-tayler/canary
Fixed network search in Traefik Labels for the service
2025-04-12 22:10:20 -06:00
Mauricio Siu
9b5cd0f5fe chore: update dependencies and enhance 2FA form
- Updated `better-auth` to version 1.2.6 in multiple package.json files.
- Updated `@better-auth/utils` to version 0.2.4 in server package.json.
- Added optional `issuer` field to the 2FA form for enhanced user experience.
- Removed unnecessary console log from the profile form component.
2025-04-12 21:11:21 -06:00
Ron_Tayler
efee798880 Fixed network search in Traefik Labels for the service 2025-04-12 22:02:27 +03:00
Mauricio Siu
37f9e073f0 fix(railpack): update environment variable handling to include quotes for consistency 2025-04-12 02:16:39 -06:00
Henrik Tøn Løvhaug
fa698d173e
Move passHostHeader to correct position 2025-04-08 22:24:19 +02:00
Lorenzo Migliorero
0e1f0b42ee fix(gitlab): update group name label and enhance group name handling
- Updated the label for the group name input field to indicate it accepts a comma-separated list.
- Modified the logic for checking group name inclusion to support multiple names separated by commas.
2025-04-07 21:43:56 +02:00
Mauricio Siu
4b15177260 Merge branch 'canary' into feat/github-triggerType 2025-04-06 15:09:45 -06:00
Mauricio Siu
bea0316bbd fix(backups): suppress output during backup and restore processes
- Updated the backup command in runWebServerBackup to suppress output by redirecting it to /dev/null.
- Modified the restore command in restoreWebServerBackup to also suppress output during the extraction of backups.
2025-04-06 03:22:03 -06:00
Mauricio Siu
48ec0a74ad
Merge pull request #1637 from Dokploy/1601-duplicate-domain-bug
feat(settings): add HTTPS support and update user schema
2025-04-06 02:42:04 -06:00
Mauricio Siu
bca6af77fd fix(traefik): update server configuration to use new host parameter and ensure HTTPS is set correctly
- Modified the updateServerTraefik function to utilize the newHost parameter instead of user.host.
- Ensured the HTTPS field is correctly initialized in the test for server configuration.
2025-04-06 02:37:15 -06:00
Mauricio Siu
b3bd9ba1ce
Merge pull request #1616 from vicke4/webserver-backup-auto-delete
fix(backups): web-server backups auto-deletion
2025-04-06 02:31:09 -06:00
Mauricio Siu
5a9c763c4f
Merge pull request #1631 from lorenzomigliorero/fix/remove-sensitive-files-from-static-build
fix(security): remove sensitive files on static build
2025-04-06 02:30:35 -06:00
Mauricio Siu
42fa4008ab feat(backups): implement normalizeS3Path utility and integrate into backup processes
- Added normalizeS3Path function to standardize S3 path formatting by trimming whitespace and removing leading/trailing slashes.
- Updated backup-related modules (MySQL, MongoDB, PostgreSQL, MariaDB, and web server) to utilize normalizeS3Path for consistent S3 path handling.
- Introduced unit tests for normalizeS3Path to ensure correct functionality across various input scenarios.
2025-04-06 02:09:23 -06:00
Mauricio Siu
1605aedd6e feat(settings): add HTTPS support and update user schema
- Introduced a new boolean field 'https' in the user schema to manage HTTPS settings.
- Updated the web domain form to include an HTTPS toggle, allowing users to enable or disable HTTPS.
- Enhanced validation logic to ensure certificate type is required when HTTPS is enabled.
- Modified Traefik configuration to handle HTTPS routing based on user settings.
2025-04-06 01:41:47 -06:00
Mauricio Siu
cb20950dd9 feat(registry): refactor Docker login command execution to use execFileAsync for improved input handling 2025-04-05 23:03:57 -06:00