lab4 done
This commit is contained in:
+61
-1
@@ -30,6 +30,41 @@ services:
|
||||
retries: 30
|
||||
cpus: 0.5
|
||||
mem_limit: 128m
|
||||
minio:
|
||||
image: mtusi-minio:RELEASE.2025-09-07T16-13-09Z
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.storage
|
||||
target: minio
|
||||
secrets: [s3_root_access_key, s3_root_secret_key]
|
||||
volumes: [s3_data:/data]
|
||||
healthcheck:
|
||||
test: [CMD, wget, -q, -T, '2', -O, /dev/null, 'http://127.0.0.1:9000/minio/health/live']
|
||||
interval: 2s
|
||||
timeout: 3s
|
||||
start_period: 15s
|
||||
retries: 30
|
||||
cpus: 1.0
|
||||
mem_limit: 512m
|
||||
stop_grace_period: 20s
|
||||
s3_bootstrap:
|
||||
image: mtusi-mc:RELEASE.2025-08-13T08-35-41Z
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.storage
|
||||
target: mc
|
||||
entrypoint: [/bin/sh, /bootstrap.sh]
|
||||
configs:
|
||||
- source: s3_bootstrap
|
||||
target: /bootstrap.sh
|
||||
- source: s3_policy
|
||||
target: /policy.json
|
||||
secrets: [s3_root_access_key, s3_root_secret_key, s3_access_key, s3_secret_key]
|
||||
depends_on:
|
||||
minio:
|
||||
condition: service_healthy
|
||||
cpus: 0.5
|
||||
mem_limit: 512m
|
||||
migrations:
|
||||
image: mtusi-migrations:lab4
|
||||
build:
|
||||
@@ -59,9 +94,18 @@ services:
|
||||
CURSOR_KEY_FILE: /run/secrets/cursor_key
|
||||
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
|
||||
QUERY_TIMEOUT_MS: '2000'
|
||||
S3_ENDPOINT: minio:9000
|
||||
S3_BUCKET: attachments
|
||||
S3_ACCESS_KEY_FILE: /run/secrets/s3_access_key
|
||||
S3_SECRET_KEY_FILE: /run/secrets/s3_secret_key
|
||||
S3_USE_SSL: 'false'
|
||||
GOMEMLIMIT: 1152MiB
|
||||
GOGC: '50'
|
||||
secrets: &api_secrets
|
||||
- postgres_password
|
||||
- cursor_key
|
||||
- s3_access_key
|
||||
- s3_secret_key
|
||||
ports:
|
||||
- '127.0.0.1:${PORT:-8080}:8080'
|
||||
depends_on:
|
||||
@@ -71,8 +115,10 @@ services:
|
||||
condition: service_healthy
|
||||
migrations:
|
||||
condition: service_completed_successfully
|
||||
s3_bootstrap:
|
||||
condition: service_completed_successfully
|
||||
cpus: 1.0
|
||||
mem_limit: 256m
|
||||
mem_limit: 1536m
|
||||
stop_grace_period: 10s
|
||||
tests:
|
||||
image: mtusi-messenger-tests:lab4
|
||||
@@ -91,7 +137,20 @@ services:
|
||||
condition: service_healthy
|
||||
cpus: 1.0
|
||||
mem_limit: 1g
|
||||
configs:
|
||||
s3_bootstrap:
|
||||
file: ./infra/s3-bootstrap.sh
|
||||
s3_policy:
|
||||
file: ./infra/s3-policy.json
|
||||
secrets:
|
||||
s3_root_access_key:
|
||||
file: ./secrets/s3_root_access_key
|
||||
s3_root_secret_key:
|
||||
file: ./secrets/s3_root_secret_key
|
||||
s3_access_key:
|
||||
file: ./secrets/s3_access_key
|
||||
s3_secret_key:
|
||||
file: ./secrets/s3_secret_key
|
||||
postgres_password:
|
||||
file: ./secrets/postgres_password
|
||||
cursor_key:
|
||||
@@ -99,3 +158,4 @@ secrets:
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
s3_data:
|
||||
|
||||
Reference in New Issue
Block a user