From 131175d992cdba90d5d5a1af97cf32b7a6beeac9 Mon Sep 17 00:00:00 2001 From: Jake Low Date: Tue, 21 Jan 2025 09:55:26 -0800 Subject: [PATCH] Use rclone to upload to Cloudflare instead of awscli --- renderer/render_once.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/renderer/render_once.sh b/renderer/render_once.sh index 997cb73..7377b63 100755 --- a/renderer/render_once.sh +++ b/renderer/render_once.sh @@ -84,8 +84,13 @@ for file in "$DIR/layers/"*.yml; do { # upload to AWS S3 bucket aws s3 cp "$WORKING_DIR/data/$layer_name.pmtiles" s3://osmus-tile/ --only-show-errors + # also upload the same data to a Cloudflare R2 bucket (testing this as a new hosting option) - env AWS_PROFILE=osmus-r2 aws s3 cp "$WORKING_DIR/data/$layer_name.pmtiles" s3://osmus-tile/ --only-show-errors + # env AWS_PROFILE=osmus-r2 aws s3 cp "$WORKING_DIR/data/$layer_name.pmtiles" s3://osmus-tile/ --only-show-errors + # NOTE: the above doesn't work right now due to an S3/R2 compatibility issue; as a workaround + # we'll use rclone for now: + rclone copyto "$WORKING_DIR/data/$layer_name.pmtiles" "osmus-r2://osmus-tile/$layer_name.pmtiles" --s3-no-check-bucket + rm -rf "$WORKING_DIR/data/$layer_name.pmtiles" } & done