Skip to content
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
24 changes: 12 additions & 12 deletions dockerfiles/entrypoints/createbuckets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
test "${INIT}" || exit 0

/usr/src/app/docker/wait-for-it.sh storage:9000 --timeout=30 --strict
/usr/bin/mc alias set myrustfs http://storage:9000 "$RUSTFS_ROOT_USER" "$RUSTFS_ROOT_PASSWORD";
/usr/bin/mc mb myrustfs/static;
/usr/bin/mc policy set public myrustfs/static;
/usr/bin/mc mb myrustfs/media;
/usr/bin/mc policy set public myrustfs/media;
/usr/bin/mc mb myrustfs/build-tools;
/usr/bin/mc policy set public myrustfs/build-tools;
/usr/bin/mc mb myrustfs/builds;
/usr/bin/mc policy set public myrustfs/builds;
/usr/bin/mc mb myrustfs/usercontent;
/usr/bin/mc policy set public myrustfs/usercontent;
/usr/bin/mc mb myrustfs/build-uploads;
/usr/local/bin/rc alias set myrustfs http://storage:9000 "$RUSTFS_ROOT_USER" "$RUSTFS_ROOT_PASSWORD";
/usr/local/bin/rc bucket create -p myrustfs/static;
/usr/local/bin/rc bucket anonymous set download myrustfs/static;
/usr/local/bin/rc bucket create -p myrustfs/media;
/usr/local/bin/rc bucket anonymous set download myrustfs/media;
/usr/local/bin/rc bucket create -p myrustfs/build-tools;
/usr/local/bin/rc bucket anonymous set download myrustfs/build-tools;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/usr/local/bin/rc bucket anonymous set download myrustfs/build-tools;
/usr/local/bin/rc bucket public set download myrustfs/build-tools;

We want to this to be public so we can upload tools downloaded from production S3 without recompiling them locally with something like readthedocs/readthedocs.org#13161

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This permission allows uploading using a password, that script uses a password, so it's safe.

/usr/local/bin/rc bucket create -p myrustfs/builds;
/usr/local/bin/rc bucket anonymous set download myrustfs/builds;
/usr/local/bin/rc bucket create -p myrustfs/usercontent;
/usr/local/bin/rc bucket anonymous set download myrustfs/usercontent;
/usr/local/bin/rc bucket create -p myrustfs/build-uploads;
exit 0;
Loading