808 Commits

Author SHA1 Message Date
Andras Bacsai
4ce495d91e Update app/Livewire/Project/Application/PreviewsCompose.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-24 17:53:18 +02:00
Michael Engel
8ee4ddf489 fix(PreviewCompose): adds port to preview urls 2025-09-24 10:52:01 +02:00
Andras Bacsai
b1abdcee83 feat(environment-variables): implement environment variable analysis for build-time issues
- Added EnvironmentVariableAnalyzer trait to analyze and warn about problematic environment variables during the build process.
- Integrated analysis into ApplicationDeploymentJob and Livewire components to provide feedback on potential build issues.
- Introduced a new Blade component for displaying warnings related to environment variables in the UI.
2025-09-23 08:53:14 +02:00
Andras Bacsai
36dfd1bc6e refactor(github): enhance API request handling and validation
- Updated validation rules for 'custom_user' and 'custom_port' fields to be nullable in the GithubController.
- Refactored API request handling in GithubController, GithubPrivateRepository, and helper functions to use a consistent Http::GitHub method with timeout and retry logic.
- Improved error handling for repository and branch loading processes.
2025-09-22 15:41:56 +02:00
Andras Bacsai
4fc62ea33f Merge pull request #6496 from QarthO/fix/url-validation
fix(domains) url validation silently fails with surrounding whitespace
2025-09-22 12:49:43 +02:00
Andras Bacsai
b1ad24eecf Merge pull request #6657 from ShadowArcanist/shadow/metrics-visual-improvements
chore(ui): improve sentinel metrics
2025-09-22 09:46:26 +02:00
Andras Bacsai
4f71d14d39 feat(event): introduce ApplicationConfigurationChanged event to handle team-specific configuration updates and broadcast changes
feat(envs): Generate hash from secrets to invalidate docker layers
2025-09-22 09:44:30 +02:00
ShadowArcanist
ee9cf076c3 Removed debug logging for metrics 2025-09-19 23:28:25 +05:30
ShadowArcanist
0ef0247e14 Improved metrics graph tooltip to show usage in a better way and added timestamp to the tooltip 2025-09-19 22:40:08 +05:30
Andras Bacsai
f33df13c4e feat(environment): replace is_buildtime_only with is_runtime and is_buildtime flags for environment variables, updating related logic and views 2025-09-18 18:14:54 +02:00
Andras Bacsai
074c70c8ab fix(clone): update destinations method call to ensure correct retrieval of selected destination 2025-09-18 13:44:56 +02:00
Andras Bacsai
c1bee32f09 feat(deployment): introduce 'use_build_secrets' setting for enhanced security during Docker builds and update related logic in deployment process 2025-09-17 10:34:38 +02:00
Andras Bacsai
9e8fb36bc8 feat(deployment): implement cancellation checks during deployment process to enhance user control and prevent unnecessary execution 2025-09-16 13:40:51 +02:00
Andras Bacsai
133e72336a Revert "refactor(file-transfer): replace base64 encoding with direct file transfer method in various components for improved clarity and efficiency"
This reverts commit feacedbb04.
2025-09-15 17:56:48 +02:00
Andras Bacsai
97428a4a80 feat(executions): add 'Load All' button to view all logs and implement loadAllLogs method for complete log retrieval 2025-09-15 11:05:29 +02:00
Andras Bacsai
8e155f25b3 refactor(environment): streamline environment variable handling by replacing sorting methods with direct property access and enhancing query ordering for improved performance 2025-09-12 12:09:03 +02:00
Andras Bacsai
20ad2165e7 feat(environment): introduce 'is_buildtime_only' attribute to environment variables for improved build-time configuration 2025-09-11 17:38:16 +02:00
Andras Bacsai
5b3b4bbc43 refactor(environment): remove 'is_build_time' attribute from environment variable handling across the application to simplify configuration 2025-09-11 16:51:56 +02:00
Andras Bacsai
501e6a2650 refactor(environment): standardize service name formatting by replacing '-' and '.' with '_' in environment variable keys 2025-09-11 13:59:02 +02:00
Andras Bacsai
13af4811f5 feat(storages): add method to retrieve the first storage ID for improved stability in storage display 2025-09-11 13:41:22 +02:00
Andras Bacsai
5e0b86f322 Merge pull request #6170 from mindedtech/Add-SERVICE_NAME-variable-for-docker-compose-services
Add SERVICE_NAME variable for docker compose services
2025-09-11 13:06:10 +02:00
Andras Bacsai
0db2835565 fix(application): add functionality to stop and remove Docker containers on server 2025-09-11 12:39:28 +02:00
Andras Bacsai
e74da06465 refactor(clone): consolidate application cloning logic into a dedicated function for improved maintainability and readability 2025-09-11 10:38:08 +02:00
Andras Bacsai
feacedbb04 refactor(file-transfer): replace base64 encoding with direct file transfer method in various components for improved clarity and efficiency 2025-09-09 11:10:38 +02:00
Andras Bacsai
a7671ed379 refactor(dns-validation): rename DNS validation functions for consistency and clarity, and remove unused code 2025-09-09 09:00:35 +02:00
Arnaud B
e23ab1e621 feat(deployment): add SERVICE_NAME variables for service discovery
This change introduces automatically generated `SERVICE_NAME_<SERVICE>`
environment variables for each service within a Docker Compose deployment.
This allows services to reliably reference each other by name, which is particularly
useful in pull request environments where container names are dynamically suffixed.

- The application parser now generates and injects these `SERVICE_NAME` variables
   into the environment of all services in the compose file.
- `ApplicationDeploymentJob` is updated to correctly handle and filter these
  new variables during deployment.
- UI components and the `EnvironmentVariableProtection` trait have been updated
to make these generated variables read-only, preventing accidental modification.

This commit introduces two new helper functions to standardize resource naming
for pull request deployments:

-  `addPreviewDeploymentSuffix()`: Generates a consistent suffix format (-pr-{id})
   for resource names in preview deployments
-  `generateDockerComposeServiceName()`: Creates SERVICE_NAME environment variables
   for Docker Compose services
2025-09-08 15:22:44 +02:00
Andras Bacsai
339118558c feat(settings): add option to restrict PR deployments to repository members and contributors 2025-09-05 14:30:51 +02:00
QarthO
bfc8a25b72 move domain trimming before URL validation 2025-08-29 09:09:03 -04:00
Andras Bacsai
80499a03d8 feat(domains): implement domain conflict detection and user confirmation modal across application components 2025-08-28 10:52:41 +02:00
Andras Bacsai
e0aa28ba31 refactor(domains): rename check_domain_usage to checkDomainUsage and update references across the application 2025-08-28 10:00:19 +02:00
Andras Bacsai
2e85ce0e0e refactor(urls): replace generateFqdn with generateUrl for consistent URL generation across applications 2025-08-28 09:49:58 +02:00
Andras Bacsai
63fcc0ebc3 feat(acl): Change views/backend code to able to use proper ACL's later on. Currently it is not enabled. 2025-08-26 10:27:38 +02:00
Andras Bacsai
ae1b0de561 feat(auth): enhance authorization checks in Livewire components for resource management 2025-08-26 10:27:38 +02:00
Andras Bacsai
adb8f9d88e feat(auth): implement authorization checks for database management 2025-08-23 18:50:35 +02:00
Andras Bacsai
6d02f6a60b feat(auth): add comprehensive authorization checks for all kind of resource creations 2025-08-23 18:47:31 +02:00
Andras Bacsai
6ef16f6170 fix(auth): enhance authorization checks in application management 2025-08-23 18:19:50 +02:00
Andras Bacsai
40f108d6e1 feat(auth): implement authorization checks for application management 2025-08-22 16:47:59 +02:00
Andras Bacsai
8408205955 feat(validation): add custom validation rules for Git repository URLs and branches
- Introduced `ValidGitRepositoryUrl` and `ValidGitBranch` validation rules to ensure safe and valid input for Git repository URLs and branch names.
- Updated relevant Livewire components and API controllers to utilize the new validation rules, enhancing security against command injection and invalid inputs.
- Refactored existing validation logic to improve consistency and maintainability across the application.
2025-08-22 14:38:21 +02:00
Andras Bacsai
a6fc39e798 feat(git-settings): add support for shallow cloning in application settings
- Introduced a new boolean setting `is_git_shallow_clone_enabled` to the application settings model.
- Updated the `Advanced` component to include a checkbox for enabling shallow cloning.
- Modified the `setGitImportSettings` and `generateGitImportCommands` methods to handle shallow clone logic.
- Created a migration to add the new setting to the database schema.
- Enhanced the deployment process to utilize shallow cloning for improved performance.
2025-08-21 10:16:57 +02:00
Andras Bacsai
5c4a265542 refactor(validation): implement centralized validation patterns across components
- Introduced `ValidationPatterns` class to standardize validation rules and messages for various fields across multiple components.
- Updated components including `General`, `StackForm`, `Create`, and `Show` to utilize the new validation patterns, ensuring consistent validation logic.
- Enhanced error messages for required fields and added regex validation for names and descriptions to improve user feedback.
- Adjusted styling in the `create.blade.php` view for better visual hierarchy.
2025-08-19 14:15:31 +02:00
Andras Bacsai
38c0641734 feat(validation): centralize validation patterns for names and descriptions
- Introduced `ValidationPatterns` class to standardize validation rules and messages for name and description fields across the application.
- Updated various components and models to utilize the new validation patterns, ensuring consistent sanitization and validation logic.
- Replaced the `HasSafeNameAttribute` trait with `HasSafeStringAttribute` to enhance attribute handling and maintain consistency in name sanitization.
- Enhanced the `CleanupNames` command to align with the new validation rules, allowing for a broader range of valid characters in names.
2025-08-19 12:14:48 +02:00
Andras Bacsai
e958b3761d feat(cleanup): add command for sanitizing name fields across models
- Introduced `CleanupNames` command to sanitize name fields by removing invalid characters, ensuring only letters, numbers, spaces, dashes, underscores, and dots are retained.
- Implemented options for dry run, model-specific cleaning, database backup, and forced execution.
- Updated `Init` command to call the new `cleanup:names` command.
- Enhanced project and environment validation to enforce name sanitization rules.
- Added `HasSafeNameAttribute` trait to relevant models for consistent name handling.
2025-08-19 11:04:23 +02:00
Andras Bacsai
5cfe6464aa fix(database): conditionally set started_at only if the database is running 2025-08-18 12:09:58 +02:00
Andras Bacsai
460198bb05 fix(application): clear Docker Compose specific data when switching away from dockercompose 2025-08-18 11:31:14 +02:00
Andras Bacsai
0dada987a2 feat(backup): add disable local backup option and related logic for S3 uploads 2025-08-17 12:34:20 +02:00
Andras Bacsai
970fd3d9e6 refactor(parsers): streamline domain handling in applicationParser and improve DNS validation logic 2025-08-12 10:07:11 +02:00
Andras Bacsai
e8892b3d29 feat(core): finally fqdn is fqdn and url is url. haha 2025-08-12 10:06:19 +02:00
Andras Bacsai
a0bc4dac55 fix(application): streamline environment variable updates for Docker Compose services and enhance FQDN generation logic 2025-08-12 10:06:19 +02:00
Andras Bacsai
cc5abc093d fix(container): sort containers alphabetically by name in ExecuteContainerCommand and update filtering in Terminal Index 2025-08-12 10:06:19 +02:00
peaklabs-dev
279edf696c chore(docker): remove unused arguments on StopService 2025-08-04 22:12:56 +02:00