Skip to content

Commit

Permalink
refactor: add s3 bucket name to prod install script
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Nov 8, 2023
1 parent 0434b46 commit c4a0fae
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
13 changes: 11 additions & 2 deletions scripts/gen-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() {
Expand Down
11 changes: 10 additions & 1 deletion src/frontend/public/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit c4a0fae

Please sign in to comment.