Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rclone to upload to Cloudflare instead of awscli #26

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" --s3-no-check-bucket

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