Skip to content

Commit

Permalink
added environment variable for production due to issue determining en…
Browse files Browse the repository at this point in the history
…vironment
  • Loading branch information
Thistleman committed Nov 29, 2023
1 parent 54d33dd commit 60e1679
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions workers/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ RUN mkdir worker
WORKDIR /root/worker
COPY . .

# Set environment variables for prod
ENV PROD=true

ENV PORT 8500
EXPOSE 8500
EXPOSE 65535
Expand Down
2 changes: 1 addition & 1 deletion workers/pvinsight-validation-runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def is_local():
Returns:
bool: True if the application is running locally, False otherwise.
"""
return 'AWS_EXECUTION_ENV' not in os.environ and 'ECS_CONTAINER_METADATA_URI' not in os.environ and 'ECS_CONTAINER_METADATA_URI_V4' not in os.environ
return 'AWS_EXECUTION_ENV' not in os.environ and 'ECS_CONTAINER_METADATA_URI' not in os.environ and 'ECS_CONTAINER_METADATA_URI_V4' not in os.environ and 'PROD' not in os.environ

is_s3_emulation = is_local()

Expand Down
2 changes: 1 addition & 1 deletion workers/submission_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def is_local():
Returns:
bool: True if the application is running locally, False otherwise.
"""
return 'AWS_EXECUTION_ENV' not in os.environ and 'ECS_CONTAINER_METADATA_URI' not in os.environ and 'ECS_CONTAINER_METADATA_URI_V4' not in os.environ
return 'AWS_EXECUTION_ENV' not in os.environ and 'ECS_CONTAINER_METADATA_URI' not in os.environ and 'ECS_CONTAINER_METADATA_URI_V4' not in os.environ and 'PROD' not in os.environ

is_s3_emulation = is_local()

Expand Down

0 comments on commit 60e1679

Please sign in to comment.