From bcb48cdacd7434613e710fc98baae6d9dd53e29b Mon Sep 17 00:00:00 2001 From: "raoha.rh" Date: Fri, 30 Aug 2024 15:57:54 +0800 Subject: [PATCH] fix: revert envs --- docker/Dockerfile.aws.lambda | 1 - docker/Dockerfile.subscriber | 1 - petercat_utils/utils/env.py | 8 ++------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/docker/Dockerfile.aws.lambda b/docker/Dockerfile.aws.lambda index 3254c372..f0572fef 100644 --- a/docker/Dockerfile.aws.lambda +++ b/docker/Dockerfile.aws.lambda @@ -15,6 +15,5 @@ RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}" -U --no-cach # Set NLTK_DATA to load nltk_data ENV NLTK_DATA=/opt/nltk_data -ENV ENV=production CMD ["python", "main.py"] diff --git a/docker/Dockerfile.subscriber b/docker/Dockerfile.subscriber index 1b5d2b93..1c80707b 100644 --- a/docker/Dockerfile.subscriber +++ b/docker/Dockerfile.subscriber @@ -8,6 +8,5 @@ RUN pip install -r requirements.txt # Copy function code COPY . ${LAMBDA_TASK_ROOT} -ENV ENV=production # Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile) CMD [ "handler.lambda_handler" ] \ No newline at end of file diff --git a/petercat_utils/utils/env.py b/petercat_utils/utils/env.py index 5fdcf3ad..9564feeb 100644 --- a/petercat_utils/utils/env.py +++ b/petercat_utils/utils/env.py @@ -2,12 +2,8 @@ import os def load_env(): - env = os.getenv("ENV", "development") - print(f"load_env={env}") - load_dotenv(verbose=True, override=True) - - if env == 'development': - load_dotenv(dotenv_path=".env.local", verbose=True, override=True) + load_dotenv(verbose=True, override=True) + load_dotenv(dotenv_path=".env.local", verbose=True, override=True) load_env()