@deploystack/docker-to-iac
Version:
Translate docker run and docker compose file to Infrastructure as Code
29 lines (28 loc) • 1.39 kB
TypeScript
/**
* Assertions for validating port mappings in Render.com Blueprint YAML output
*/
/**
* Validates that the port mappings in the Render YAML match expected values
* Render doesn't explicitly set http_port in all cases, but uses the PORT env variable
*
* @param renderYaml The parsed Render YAML blueprint
* @param serviceName The name of the service to check
* @param expectedPort The expected port value
* @returns boolean indicating if validation passes
*/
export declare function validatePortMappingInRender(renderYaml: any, serviceName: string, expectedPort: number): boolean;
/**
* Validates port configurations across multiple services
* @param renderYaml The parsed Render YAML blueprint
* @param expectedPorts Map of service names to their expected ports
* @returns boolean indicating if all validations pass
*/
export declare function validateMultiplePortMappings(renderYaml: any, expectedPorts: Record<string, number>): boolean;
/**
* Validates that a service has the PORT environment variable set correctly
* @param renderYaml The parsed Render YAML blueprint
* @param serviceName The name of the service to check
* @param expectedValue The expected value for the PORT variable
* @returns boolean indicating if validation passes
*/
export declare function validatePortEnvironmentVariable(renderYaml: any, serviceName: string, expectedValue: string): boolean;