Skip to content

Commit

Permalink
Use rclone to upload to Cloudflare instead of awscli
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-low committed Jan 21, 2025
1 parent 9f26827 commit e4f429c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion renderer/render_once.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

rm -rf "$WORKING_DIR/data/$layer_name.pmtiles"
} &
done
Expand Down

0 comments on commit e4f429c

Please sign in to comment.