Skip to content

Commit

Permalink
build: update var S3_SKIP_BUCKET_INIT skip init if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Feb 24, 2024
1 parent 62abc23 commit 627dfbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ S3_ACCESS_KEY=${S3_ACCESS_KEY:-"fmtm"}
S3_SECRET_KEY=${S3_SECRET_KEY:-"somelongpassword"}
S3_BUCKET_NAME=${S3_BUCKET_NAME:-"fmtm-data"}
S3_DOWNLOAD_ROOT=${S3_DOWNLOAD_ROOT}
S3_SKIP_BUCKET_INIT=${S3_SKIP_BUCKET_INIT}

### Database (optional) ###
CENTRAL_DB_HOST=${CENTRAL_DB_HOST:-"central-db"}
Expand All @@ -41,4 +42,4 @@ FMTM_DB_PASSWORD=${FMTM_DB_PASSWORD:-"fmtm"}
FMTM_DB_NAME=${FMTM_DB_NAME:-"fmtm"}

### Underpass (optional override) ###
UNDERPASS_API_URL=${UNDERPASS_API_URL:-"https://raw-data-api0.hotosm.org/v1"}
UNDERPASS_API_URL=${UNDERPASS_API_URL:-"https://api-prod.raw-data.hotosm.org/v1/"}
4 changes: 2 additions & 2 deletions src/backend/app-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ wait_for_s3 &
# Wait until checks complete
wait

# Skip init S3 if env var passed
if [ -z "$SKIP_S3_INIT" ]; then
# Skip init S3 if env var present and not empty
if [ -z "${S3_SKIP_BUCKET_INIT+x}" ]; then
create_s3_buckets
fi

Expand Down

0 comments on commit 627dfbe

Please sign in to comment.