Skip to content

Commit

Permalink
Merge pull request #3189 from owid/s3-spaces-profile
Browse files Browse the repository at this point in the history
🐝 set the dev tools to use a profile for s3 credentials
  • Loading branch information
larsyencken authored Feb 14, 2024
2 parents a240577 + 9c414a4 commit 447f80c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion devTools/docker/sync-s3-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,12 @@ fi
# for local development, it should be owid-image-upload/local-yourname
# at least until we decide to instead host images locally, if ever

aws --endpoint=https://nyc3.digitaloceanspaces.com s3 sync s3://owid-image-upload/production/ s3://$IMAGE_HOSTING_BUCKET_PATH/ --acl public-read
if ! grep -q 'profile owid-spaces' ~/.aws/config; then
echo 'Please configure your S3 credentials for profile owid-spaces:'
echo
echo ' aws configure --profile=owid-spaces'
echo
exit 1
fi

aws --profile=owid-spaces --endpoint=https://nyc3.digitaloceanspaces.com s3 sync s3://owid-image-upload/production/ s3://$IMAGE_HOSTING_BUCKET_PATH/ --acl public-read

0 comments on commit 447f80c

Please sign in to comment.