From 0fdb8cb3ab1f27b80298ec10daf792400eea5e5b Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 8 Nov 2023 03:15:44 +0000 Subject: [PATCH] refactor: add s3 bucket name to prod install script --- scripts/gen-env.sh | 13 +++++++++++-- src/frontend/public/install.sh | 11 ++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/scripts/gen-env.sh b/scripts/gen-env.sh index bec45c9f2a..60577bf3a6 100644 --- a/scripts/gen-env.sh +++ b/scripts/gen-env.sh @@ -252,7 +252,7 @@ check_external_database() { } set_external_s3() { - pretty_echo "S3 Credentials" + heading_echo "S3 Credentials" echo "Please enter the S3 host endpoint." read -e -p "S3 Endpoint: " S3_ENDPOINT @@ -269,7 +269,16 @@ set_external_s3() { echo export S3_SECRET_KEY=${S3_SECRET_KEY} - # TODO update S3_BUCKET_NAME_BASEMAPS & S3_BUCKET_NAME_OVERLAYS + if [ "$BRANCH_NAME" == "main" ] then; + yellow_echo "Production deployments require a preconfigured S3 bucket." + echo + yellow_echo "The bucket should be public." + echo + echo "Please enter the bucket name." + read -e -p "S3 Bucket Name: " S3_BUCKET_NAME_BASEMAPS + echo + export S3_BUCKET_NAME_BASEMAPS=${S3_BUCKET_NAME_BASEMAPS} + fi } set_minio_s3_creds() { diff --git a/src/frontend/public/install.sh b/src/frontend/public/install.sh index 8532d4e86d..951f6a6c86 100644 --- a/src/frontend/public/install.sh +++ b/src/frontend/public/install.sh @@ -634,7 +634,16 @@ set_external_s3() { echo export S3_SECRET_KEY=${S3_SECRET_KEY} - # TODO update S3_BUCKET_NAME_BASEMAPS & S3_BUCKET_NAME_OVERLAYS + if [ "$BRANCH_NAME" == "main" ] then; + yellow_echo "Production deployments require a preconfigured S3 bucket." + echo + yellow_echo "The bucket should be public." + echo + echo "Please enter the bucket name." + read -e -p "S3 Bucket Name: " S3_BUCKET_NAME_BASEMAPS + echo + export S3_BUCKET_NAME_BASEMAPS=${S3_BUCKET_NAME_BASEMAPS} + fi } set_minio_s3_creds() {