fix: add HEROKU_ENV

This commit is contained in:
Gabriel Pastori 2023-09-10 14:35:15 -03:00
parent 88011daf72
commit 05053381ef
2 changed files with 5 additions and 1 deletions

View File

@ -171,6 +171,10 @@
"AUTHENTICATION_JWT_SECRET": {
"description": "The secret for jwt. (only for jwt authentication)",
"generator": "secret"
},
"HEROKU_ENV": {
"description": "Enable heroku env. (true/false) (only for heroku)",
"value": "true"
}
},
"formation": {

View File

@ -161,7 +161,7 @@ export class ConfigService {
}
private loadEnv() {
this.env = !(process.env?.DOCKER_ENV === 'true') ? this.envYaml() : this.envProcess();
this.env = !(process.env?.DOCKER_ENV === 'true') && !process.env?.HEROKU_ENV ? this.envYaml() : this.envProcess();
this.env.PRODUCTION = process.env?.NODE_ENV === 'PROD';
if (process.env?.DOCKER_ENV === 'true') {
this.env.SERVER.TYPE = 'http';