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()