Skip to content

Commit

Permalink
feat: allow to override endpoint_url for s3 buckets (yearn#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
crebsy authored and 0xBasically committed Sep 13, 2023
1 parent 0426420 commit c447adc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,13 @@ def _export(data, file_name, s3_path):


def _get_s3():
aws_endpoint_url = os.environ.get("AWS_ENDPOINT_URL")
aws_key = os.environ.get("AWS_ACCESS_KEY")
aws_secret = os.environ.get("AWS_ACCESS_SECRET")

kwargs = {}
if aws_endpoint_url is not None:
kwargs["endpoint_url"] = aws_endpoint_url
if aws_key is not None:
kwargs["aws_access_key_id"] = aws_key
if aws_secret is not None:
Expand Down
1 change: 1 addition & 0 deletions services/dashboard/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ x-envs: &envs
- ETH_HASH_BACKEND=${ETH_HASH_BACKEND:-pysha3}

# APY ENVS
- AWS_ENDPOINT_URL=${AWS_ENDPOINT_URL:-https://s3.amazonaws.com}
- AWS_ACCESS_KEY
- AWS_ACCESS_SECRET
- AWS_BUCKET
Expand Down

0 comments on commit c447adc

Please sign in to comment.