refactor(server): telemetry ports env (#13560)

This commit is contained in:
Jason Rasmussen
2024-10-17 17:00:22 -04:00
committed by GitHub
parent 0eabb3ef80
commit c8f672f494
6 changed files with 80 additions and 18 deletions

View File

@@ -117,6 +117,13 @@ const getEnv = (): EnvData => {
licensePublicKey: isProd ? productionKeys : stagingKeys,
network: {
trustedProxies: (process.env.IMMICH_TRUSTED_PROXIES ?? '')
.split(',')
.map((value) => value.trim())
.filter(Boolean),
},
redis: redisConfig,
resourcePaths: {
@@ -138,6 +145,11 @@ const getEnv = (): EnvData => {
ignoreMountCheckErrors: process.env.IMMICH_IGNORE_MOUNT_CHECK_ERRORS === 'true',
},
telemetry: {
apiPort: Number(process.env.IMMICH_API_METRICS_PORT || '') || 8081,
microservicesPort: Number(process.env.IMMICH_MICROSERVICES_METRICS_PORT || '') || 8082,
},
workers,
noColor: !!process.env.NO_COLOR,