From 2f569d41047a802eb72ef1a3618ffe4df28a709c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Fri, 2 Jun 2023 12:52:43 +0200 Subject: [PATCH] fix(home-server): add default for VERSION environment variable --- packages/api-gateway/src/Bootstrap/Container.ts | 2 +- packages/home-server/.env.sample | 1 - packages/revisions/src/Bootstrap/Container.ts | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/api-gateway/src/Bootstrap/Container.ts b/packages/api-gateway/src/Bootstrap/Container.ts index ce05ccd81..93d7ee3bd 100644 --- a/packages/api-gateway/src/Bootstrap/Container.ts +++ b/packages/api-gateway/src/Bootstrap/Container.ts @@ -83,7 +83,7 @@ export class ContainerConfigLoader { container .bind(TYPES.HTTP_CALL_TIMEOUT) .toConstantValue(env.get('HTTP_CALL_TIMEOUT', true) ? +env.get('HTTP_CALL_TIMEOUT', true) : 60_000) - container.bind(TYPES.VERSION).toConstantValue(env.get('VERSION')) + container.bind(TYPES.VERSION).toConstantValue(env.get('VERSION', true) ?? 'development') container.bind(TYPES.CROSS_SERVICE_TOKEN_CACHE_TTL).toConstantValue(+env.get('CROSS_SERVICE_TOKEN_CACHE_TTL', true)) // Middleware diff --git a/packages/home-server/.env.sample b/packages/home-server/.env.sample index da3fbcbca..bfb99a2eb 100644 --- a/packages/home-server/.env.sample +++ b/packages/home-server/.env.sample @@ -1,6 +1,5 @@ LOG_LEVEL=debug NODE_ENV=development -VERSION=development JWT_SECRET= AUTH_JWT_SECRET= diff --git a/packages/revisions/src/Bootstrap/Container.ts b/packages/revisions/src/Bootstrap/Container.ts index 24784773b..c7089dcdf 100644 --- a/packages/revisions/src/Bootstrap/Container.ts +++ b/packages/revisions/src/Bootstrap/Container.ts @@ -95,7 +95,7 @@ export class ContainerConfigLoader { } container.bind(TYPES.Revisions_NEW_RELIC_ENABLED).toConstantValue(env.get('NEW_RELIC_ENABLED', true)) - container.bind(TYPES.Revisions_VERSION).toConstantValue(env.get('VERSION')) + container.bind(TYPES.Revisions_VERSION).toConstantValue(env.get('VERSION', true) ?? 'development') // Map container