coolify/app/Traits
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
..
AuthorizesResourceCreation.php feat(auth): introduce resource creation authorization middleware and policies for enhanced access control 2025-08-26 10:27:38 +02:00
DeletesUserSessions.php refactor(database): update DB facade usage for consistency across service files 2025-04-30 17:39:41 +02:00
EnvironmentVariableProtection.php feat(deployment): add SERVICE_NAME variables for service discovery 2025-09-08 15:22:44 +02:00
ExecuteRemoteCommand.php feat(ssh): add Sentry tracking for SSH retry events to enhance error monitoring 2025-09-07 18:57:20 +02:00
HasConfiguration.php feat(core): wip version of coolify.json 2025-01-21 14:09:12 +01:00
HasNotificationSettings.php fix(notification): always send SSL notifications 2025-02-11 20:55:33 +01:00
HasSafeStringAttribute.php feat(validation): centralize validation patterns for names and descriptions 2025-08-19 12:14:48 +02:00
SaveFromRedirect.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
SshRetryable.php feat(ssh): add Sentry tracking for SSH retry events to enhance error monitoring 2025-09-07 18:57:20 +02:00