Skip to content

Commit

Permalink
Merge pull request #6 from osmus/osmus-aws
Browse files Browse the repository at this point in the history
Switch to OSM US AWS
  • Loading branch information
quincylvania authored Jun 1, 2024
2 parents ef8d0a7 + d859eff commit 59dc713
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions renderer/render_once.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ elif [[ $(stat -c %s "$PLANET") -lt $((50 * 1024 * 1024 * 1024)) ]]; then
fi

echo 'Uploading planet to s3 bucket in background'
aws s3 cp "$PLANET" s3://planet-pmtiles/ --only-show-errors &
aws s3 cp "$PLANET" s3://osmus-tile/ --only-show-errors &

# Render optional layers
for file in "$DIR/layers/"*.yml; do
Expand All @@ -82,7 +82,7 @@ for file in "$DIR/layers/"*.yml; do

echo "Uploading $layer_name to s3 bucket in background"
{
aws s3 cp "$WORKING_DIR/data/$layer_name.pmtiles" s3://planet-pmtiles/ --only-show-errors
aws s3 cp "$WORKING_DIR/data/$layer_name.pmtiles" s3://osmus-tile/ --only-show-errors
rm -rf "$WORKING_DIR/data/$layer_name.pmtiles"
} &
done
Expand All @@ -91,7 +91,7 @@ echo 'Waiting for all background jobs to finish'
wait

echo 'Invalidating the CDN cache'
aws cloudfront create-invalidation --distribution-id E1E7N0LWX2WY4E --invalidation-batch "{\"Paths\": {\"Quantity\": 1, \"Items\": [\"/*\"]}, \"CallerReference\": \"invalidation-$DATE\"}"
aws cloudfront create-invalidation --distribution-id E1SJ64GZNQSV8M --invalidation-batch "{\"Paths\": {\"Quantity\": 1, \"Items\": [\"/*\"]}, \"CallerReference\": \"invalidation-$DATE\"}"

echo 'Render Complete'
date -u '+%Y-%m-%d %H:%M:%S'

0 comments on commit 59dc713

Please sign in to comment.