forked from mtusi2026/mtusi2026lab5
all for 4
This commit is contained in:
@@ -28,7 +28,6 @@ mc alias set storage http://minio:9000 \
|
||||
"$MINIO_ROOT_USER" "$MINIO_ROOT_PASSWORD" >/dev/null
|
||||
|
||||
mc mb --ignore-existing "storage/$S3_BUCKET"
|
||||
|
||||
mc anonymous set none "storage/$S3_BUCKET"
|
||||
|
||||
cat > /tmp/attachments-policy.json <<EOF
|
||||
@@ -47,7 +46,7 @@ cat > /tmp/attachments-policy.json <<EOF
|
||||
]
|
||||
},
|
||||
{
|
||||
"Sid": "ManageOriginalAttachments",
|
||||
"Sid": "ManageAttachmentObjects",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:GetObject",
|
||||
@@ -57,7 +56,9 @@ cat > /tmp/attachments-policy.json <<EOF
|
||||
"s3:ListMultipartUploadParts"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::$S3_BUCKET/originals/*"
|
||||
"arn:aws:s3:::$S3_BUCKET/originals/*",
|
||||
"arn:aws:s3:::$S3_BUCKET/staging/*",
|
||||
"arn:aws:s3:::$S3_BUCKET/variants/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -90,4 +91,4 @@ mc alias set app http://minio:9000 \
|
||||
|
||||
mc stat "app/$S3_BUCKET" >/dev/null
|
||||
|
||||
echo "Bootstrap completed: private bucket and API user are ready"
|
||||
echo "Bootstrap completed: private bucket and application user are ready"
|
||||
Reference in New Issue
Block a user