mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
Add sync_media_to_s3 command
This is useful if the copy gets aborted, or to sync over remnants generated between the copy and the switchover to S3
This commit is contained in:
parent
f7c6cb3598
commit
8eb340945b
1 changed files with 8 additions and 1 deletions
9
bw-dev
9
bw-dev
|
@ -146,7 +146,13 @@ case "$CMD" in
|
||||||
awscommand "bookwyrm_media_volume:/images"\
|
awscommand "bookwyrm_media_volume:/images"\
|
||||||
"s3 cp /images s3://${AWS_STORAGE_BUCKET_NAME}/images\
|
"s3 cp /images s3://${AWS_STORAGE_BUCKET_NAME}/images\
|
||||||
--endpoint-url ${AWS_S3_ENDPOINT_URL}\
|
--endpoint-url ${AWS_S3_ENDPOINT_URL}\
|
||||||
--recursive --acl public-read"
|
--recursive --acl public-read" "$@"
|
||||||
|
;;
|
||||||
|
sync_media_to_s3)
|
||||||
|
awscommand "bookwyrm_media_volume:/images"\
|
||||||
|
"s3 sync /images s3://${AWS_STORAGE_BUCKET_NAME}/images\
|
||||||
|
--endpoint-url ${AWS_S3_ENDPOINT_URL}\
|
||||||
|
--acl public-read" "$@"
|
||||||
;;
|
;;
|
||||||
set_cors_to_s3)
|
set_cors_to_s3)
|
||||||
awscommand "$(pwd):/bw"\
|
awscommand "$(pwd):/bw"\
|
||||||
|
@ -184,6 +190,7 @@ case "$CMD" in
|
||||||
echo " generate_thumbnails"
|
echo " generate_thumbnails"
|
||||||
echo " generate_preview_images [--all]"
|
echo " generate_preview_images [--all]"
|
||||||
echo " copy_media_to_s3"
|
echo " copy_media_to_s3"
|
||||||
|
echo " sync_media_to_s3"
|
||||||
echo " set_cors_to_s3 [cors file]"
|
echo " set_cors_to_s3 [cors file]"
|
||||||
echo " runweb [command]"
|
echo " runweb [command]"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue