diff --git a/docker-run.sh b/docker-run.sh index b0ffe6b08..1e12f44bc 100644 --- a/docker-run.sh +++ b/docker-run.sh @@ -1,3 +1,3 @@ #!/bin/sh - +ls -al envs APP_ENV=$APP_ENV yarn build:preview && yarn start diff --git a/packages/env-loader/src/env-file.ts b/packages/env-loader/src/env-file.ts index 9a80ddea3..d1e27b907 100644 --- a/packages/env-loader/src/env-file.ts +++ b/packages/env-loader/src/env-file.ts @@ -22,7 +22,11 @@ const loadEnvVarsFromPath = (path: string): EnvVars => { export const getEnvFileVars = (appEnv?: string): EnvVars => { // Load env vars from `.env.${process.env.APP_ENV}` if it exists, // otherwise load env vars from `.env.local` if it exists. + // eslint-disable-next-line no-console + console.log(`appEnv is ${appEnv}`) if (appEnv && fs.existsSync(`envs/.env.${appEnv}`)) { + // eslint-disable-next-line no-console + console.log(`we are trying to read envs/.env.${appEnv}`) return loadEnvVarsFromPath(`envs/.env.${appEnv}`) } else if (fs.existsSync('envs/.env.local')) { return loadEnvVarsFromPath(`envs/.env.local`)