@@ -70,6 +70,13 @@ export function parseEnvToConfig(env: Environment, logger?: Logger): Config {
7070 bucket : readEnvValue ( 'MINIO_BUCKET' , env ) ,
7171 accessKey : readEnvValue ( 'MINIO_ACCESS_KEY' , env ) ,
7272 secretKey : readEnvValue ( 'MINIO_SECRET_KEY' , env ) ,
73+
74+ /**
75+ * For backward compatibility
76+ */
77+ endPoint : readEnvValue ( 'MINIO_ENDPOINT' , env ) ,
78+ port : readIntegerEnv ( 'MINIO_PORT' , env ) ,
79+ useSSL : readBooleanEnv ( 'MINIO_USE_SSL' , env ) ,
7380 } ,
7481 otel : {
7582 endpoint : readEnvValue ( 'OTEL_EXPORTER_OTLP_ENDPOINT' , env ) ,
@@ -83,6 +90,12 @@ export function parseEnvToConfig(env: Environment, logger?: Logger): Config {
8390 throw new Error ( 'Failed to parse config' , { cause : parsedConfig . issues } )
8491 }
8592
93+ // For backward compatibility
94+ if ( parsedConfig . output . minio ?. endPoint && parsedConfig . output . minio ?. port ) {
95+ parsedConfig . output . minio . url = `${ parsedConfig . output . minio . useSSL ? 'https' : 'http' } ://${ parsedConfig . output . minio . endPoint } :${ parsedConfig . output . minio . port } `
96+ logger ?. withFields ( { minio : parsedConfig . output . minio } ) . warn ( 'MINIO_ENDPOINT and MINIO_PORT are deprecated, use MINIO_URL instead' )
97+ }
98+
8699 logger ?. withFields ( { config : parsedConfig . output } ) . debug ( 'Config parsed' )
87100
88101 return parsedConfig . output
0 commit comments