From a477002cabdfb6467f4e1034190143ec10226ee8 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 8 Nov 2023 03:09:55 +0000 Subject: [PATCH] refactor: remove S3_BUCKET_NAME_OVERLAYS (handled by raw-data-api) --- .env.example | 1 - src/backend/app/config.py | 1 - src/backend/app/s3.py | 5 +++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index f7af112343..25a07d47d3 100644 --- a/.env.example +++ b/.env.example @@ -28,7 +28,6 @@ S3_ENDPOINT=${S3_ENDPOINT:-"http://s3:9000"} S3_ACCESS_KEY=${S3_ACCESS_KEY:-"fmtm"} S3_SECRET_KEY=${S3_SECRET_KEY:-"somelongpassword"} S3_BUCKET_NAME_BASEMAPS=${S3_BUCKET_NAME_BASEMAPS:-"basemaps"} -S3_BUCKET_NAME_OVERLAYS=${S3_BUCKET_NAME_OVERLAYS:-"overlays"} ### Database (optional) ### CENTRAL_DB_HOST=${CENTRAL_DB_HOST:-"central-db"} diff --git a/src/backend/app/config.py b/src/backend/app/config.py index 47334aa225..edf0a9571f 100644 --- a/src/backend/app/config.py +++ b/src/backend/app/config.py @@ -111,7 +111,6 @@ def assemble_db_connection(cls, v: Optional[str], info: ValidationInfo) -> Any: S3_ACCESS_KEY: str S3_SECRET_KEY: str S3_BUCKET_NAME_BASEMAPS: str = "basemaps" - S3_BUCKET_NAME_OVERLAYS: str = "overlays" UNDERPASS_API_URL: str = "https://raw-data-api0.hotosm.org/v1" SENTRY_DSN: Optional[str] = None diff --git a/src/backend/app/s3.py b/src/backend/app/s3.py index 855d53fff1..6df16179a3 100644 --- a/src/backend/app/s3.py +++ b/src/backend/app/s3.py @@ -131,8 +131,9 @@ def startup_init_buckets(): # Init S3 Buckets client = s3_client() - create_bucket_if_not_exists(client, settings.S3_BUCKET_NAME_BASEMAPS) - create_bucket_if_not_exists(client, settings.S3_BUCKET_NAME_OVERLAYS) + create_bucket_if_not_exists( + client, settings.S3_BUCKET_NAME_BASEMAPS, is_public=True + ) if __name__ == "__main__":