Перенести реализацию мессенджера из lab6 в skeleton lab7.
Контракт, публичные тесты и README задания оставлены от lab7. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
# One SeaweedFS process: master, volume, filer, S3. The filer UI is off.
|
||||
# Anonymous identity has no actions. The API user is limited to one bucket.
|
||||
set -eu
|
||||
: "${S3_BUCKET:?}"
|
||||
: "${S3_ACCESS_KEY_ID:?}"
|
||||
: "${S3_SECRET_ACCESS_KEY:?}"
|
||||
|
||||
cat > /tmp/s3.json <<EOF
|
||||
{
|
||||
"identities": [
|
||||
{
|
||||
"name": "anonymous",
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"name": "messenger-app",
|
||||
"credentials": [
|
||||
{
|
||||
"accessKey": "${S3_ACCESS_KEY_ID}",
|
||||
"secretKey": "${S3_SECRET_ACCESS_KEY}"
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
"Read:${S3_BUCKET}",
|
||||
"Read:${S3_BUCKET}/*",
|
||||
"Write:${S3_BUCKET}",
|
||||
"Write:${S3_BUCKET}/*",
|
||||
"List:${S3_BUCKET}",
|
||||
"Tagging:${S3_BUCKET}/*",
|
||||
"Admin:${S3_BUCKET}"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
|
||||
exec weed server \
|
||||
-dir=/data \
|
||||
-ip.bind=0.0.0.0 \
|
||||
-master.port=9333 \
|
||||
-volume.port=8080 \
|
||||
-filer \
|
||||
-filer.port=8888 \
|
||||
-filer.exposeDirectoryData=false \
|
||||
-s3 \
|
||||
-s3.port=9000 \
|
||||
-s3.config=/tmp/s3.json
|
||||
Reference in New Issue
Block a user