From 3689a9a0bf140dd679fbb23f95d0b1870b8d556b Mon Sep 17 00:00:00 2001 From: yhtiyar Date: Tue, 24 Aug 2021 14:27:03 +0300 Subject: [PATCH] getting bucket from env variable --- backend/moonstream/settings.py | 4 +++- backend/sample.env | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/moonstream/settings.py b/backend/moonstream/settings.py index 440176f6..030e5c9d 100644 --- a/backend/moonstream/settings.py +++ b/backend/moonstream/settings.py @@ -43,4 +43,6 @@ for path in MOONSTREAM_OPENAPI_LIST: DEFAULT_STREAM_TIMEINTERVAL = 5 * 60 # S3 Bucket -ETHERSCAN_SMARTCONTRACTS_BUCKET = "etherscan-smart-contracts" +ETHERSCAN_SMARTCONTRACTS_BUCKET = os.environ.get("AWS_S3_SMARTCONTRACT_BUCKET") +if ETHERSCAN_SMARTCONTRACTS_BUCKET is None: + raise ValueError("AWS_S3_SMARTCONTRACT_BUCKET is not set") diff --git a/backend/sample.env b/backend/sample.env index 32438dc7..054e040d 100644 --- a/backend/sample.env +++ b/backend/sample.env @@ -5,5 +5,6 @@ export MOONSTREAM_DATA_JOURNAL_ID="" export MOONSTREAM_DB_URI="postgresql://:@:/" export MOONSTREAM_POOL_SIZE=0 export MOONSTREAM_ADMIN_ACCESS_TOKEN="" +export AWS_S3_SMARTCONTRACT_BUCKET="" export BUGOUT_BROOD_URL="https://auth.bugout.dev" export BUGOUT_SPIRE_URL="https://spire.bugout.dev"