forked from mtusi2026/mtusi2026lab4
готово
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
global
|
||||
log stdout format raw local0
|
||||
maxconn 2048
|
||||
stats socket /tmp/haproxy.sock mode 600 level admin
|
||||
stats socket ipv4@127.0.0.1:9999 level admin
|
||||
|
||||
defaults
|
||||
log global
|
||||
mode http
|
||||
option httplog
|
||||
timeout connect 1s
|
||||
timeout client 15s
|
||||
timeout server 12s
|
||||
timeout http-request 7s
|
||||
timeout http-keep-alive 2s
|
||||
timeout check 1s
|
||||
# Не повторяем POST автоматически: неизвестный результат повторяет клиент
|
||||
# с исходным Idempotency-Key. Соединения к недоступному API не ждут долго.
|
||||
retries 0
|
||||
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 1s
|
||||
hold obsolete 1s
|
||||
hold nx 1s
|
||||
hold timeout 1s
|
||||
hold refused 1s
|
||||
accepted_payload_size 8192
|
||||
|
||||
frontend public
|
||||
bind :8080
|
||||
default_backend api_pool
|
||||
|
||||
backend api_pool
|
||||
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 fastinter 500ms downinter 1s fall 2 rise 2
|
||||
server-template api 1-16 api:8080 check resolvers docker resolve-prefer ipv4 init-addr none
|
||||
@@ -0,0 +1,20 @@
|
||||
# MinIO community distribution is source-only; pin the reviewed release commit.
|
||||
FROM golang:1.24.8-alpine3.22 AS build
|
||||
RUN apk add --no-cache git
|
||||
WORKDIR /source
|
||||
RUN git init . \
|
||||
&& git remote add origin https://github.com/minio/minio.git \
|
||||
&& git fetch --depth 1 origin 9e49d5e7a648f00e26f2246f4dc28e6b07f8c84a \
|
||||
&& git checkout --detach FETCH_HEAD
|
||||
ENV CGO_ENABLED=0 GOMAXPROCS=2
|
||||
RUN go build -p 2 -trimpath -o /minio .
|
||||
|
||||
FROM alpine:3.22.2
|
||||
RUN apk add --no-cache ca-certificates \
|
||||
&& addgroup -S minio && adduser -S -G minio minio \
|
||||
&& mkdir /data && chown minio:minio /data
|
||||
COPY --from=build /minio /usr/local/bin/minio
|
||||
USER minio
|
||||
EXPOSE 9000
|
||||
ENTRYPOINT ["minio"]
|
||||
CMD ["server", "/data", "--console-address", ":9001"]
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": ["s3:ListBucket", "s3:GetBucketLocation"],
|
||||
"Resource": ["arn:aws:s3:::${bucket}"]
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:GetObject",
|
||||
"s3:PutObject",
|
||||
"s3:AbortMultipartUpload",
|
||||
"s3:ListMultipartUploadParts"
|
||||
],
|
||||
"Resource": ["arn:aws:s3:::${bucket}/originals/*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": ["s3:ListBucket", "s3:GetBucketLocation", "s3:GetBucketVersioning"],
|
||||
"Resource": ["arn:aws:s3:::${bucket}"]
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": ["s3:GetObject", "s3:DeleteObject"],
|
||||
"Resource": ["arn:aws:s3:::${bucket}/originals/*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user