This commit is contained in:
2026-11-10 19:24:33 +03:00
parent c594b88a46
commit b55b230533
23 changed files with 1200 additions and 73 deletions
+73
View File
@@ -129,6 +129,79 @@ services:
depends_on:
minio:
condition: service_healthy
deploy:
resources:
limits:
cpus: "0.5"
memory: 256M
restart: "no"
# Operator one-shot: python -m app.reconcile (dry-run). Pass --apply / --seed-orphan as args.
# Not started by `up`; use: docker compose --env-file .env --profile ops run --rm reconcile
reconcile:
image: messenger-lab4-app:${APP_VERSION:-dev}
build: *app-build
profiles: ["ops"]
entrypoint: ["python", "-m", "app.reconcile"]
environment:
<<: *db-client
S3_ENDPOINT: ${S3_ENDPOINT:?set in .env}
S3_REGION: ${S3_REGION:-us-east-1}
S3_BUCKET: ${S3_BUCKET:?set in .env}
S3_ACCESS_KEY_ID_FILE: /run/secrets/s3_access_key_id
S3_SECRET_ACCESS_KEY_FILE: /run/secrets/s3_secret_access_key
RECONCILE_GRACE_SECONDS: ${RECONCILE_GRACE_SECONDS:-900}
secrets:
- source: postgres_password
uid: "10001"
gid: "10001"
mode: 0400
- source: s3_access_key_id
uid: "10001"
gid: "10001"
mode: 0400
- source: s3_secret_access_key
uid: "10001"
gid: "10001"
mode: 0400
networks:
- data
depends_on:
postgres:
condition: service_healthy
migrate:
condition: service_completed_successfully
minio-init:
condition: service_completed_successfully
deploy:
resources:
limits:
cpus: "0.5"
memory: 128M
restart: "no"
# Unauthenticated GET and console probe from the internal data network.
check-private-bucket:
image: ghcr.io/tsouza/cerberus-mirror/minio/minio:RELEASE.2025-09-07T16-13-09Z@sha256:14cea493d9a34af32f524e538b8346cf79f3321eff8e708c1e2960462bd8936e
profiles: ["ops"]
entrypoint: ["/bin/sh", "/bootstrap/check-private-bucket.sh"]
environment:
S3_BUCKET: ${S3_BUCKET:?set in .env}
MINIO_ENDPOINT: http://minio:9000
secrets:
- minio_root_user
- minio_root_password
- s3_access_key_id
- s3_secret_access_key
volumes:
- ./infra/minio/check-private-bucket.sh:/bootstrap/check-private-bucket.sh:ro
networks:
- data
depends_on:
minio:
condition: service_healthy
minio-init:
condition: service_completed_successfully
deploy:
resources:
limits: