forked from mtusi2026/mtusi2026lab5
Перенести рабочую базу lab4 в skeleton лабораторной 5.
Исходники, миграции, Dockerfile и стенд lab4 нужны как основа асинхронной обработки вложений. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
global
|
||||
log stdout format raw local0 info
|
||||
maxconn 200
|
||||
|
||||
defaults
|
||||
log global
|
||||
mode http
|
||||
option httplog
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
timeout http-request 15s
|
||||
timeout check 2s
|
||||
timeout queue 2s
|
||||
retries 1
|
||||
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 1s
|
||||
accepted_payload_size 8192
|
||||
|
||||
frontend fe_http
|
||||
bind *:8080
|
||||
default_backend be_api
|
||||
|
||||
backend be_api
|
||||
balance roundrobin
|
||||
option httpchk
|
||||
http-check send meth GET uri /health/ready ver HTTP/1.1 hdr host api
|
||||
http-check expect status 200
|
||||
default-server inter 1s fall 2 rise 1
|
||||
server-template srv 8 api:8080 check resolvers docker init-addr none resolve-prefer ipv4
|
||||
@@ -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