Commit Graph

14 Commits

Author SHA1 Message Date
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
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
efc1264810 fix(parsers): do not modify service names, only for getting fqdns and related envs 2025-08-27 21:22:04 +02:00
Andras Bacsai
3e816c8281 refactor(parsers): remove unnecessary hyphen-to-underscore replacement for service names in serviceParser function 2025-08-27 18:36:58 +02:00
Andras Bacsai
cde528bf5e fix(parsers): enhance volume string handling by preserving mode in application and service parsers. Update related unit tests for validation. 2025-08-27 16:54:49 +02:00
Andras Bacsai
5fbad08e45 fix(parsers): implement parseDockerVolumeString function to handle various Docker volume formats and modes, including environment variables and Windows paths. Add unit tests for comprehensive coverage. 2025-08-27 16:39:38 +02:00
Andras Bacsai
4a1eb064a4 fix(parsers): replace hyphens with underscores in service names for consistency. this allows to properly parse custom domains in docker compose based applications 2025-08-27 16:22:37 +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
be34c0c2b4 refactor(parsers): update volume parsing logic to use beforeLast and afterLast for improved accuracy 2025-08-17 18:36:28 +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
936a192236 fix(parsers): clarify comments and update variable checks for FQDN and URL handling 2025-08-12 10:06:19 +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