mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 19:49:40 +02:00
feat(storage): add deleteByPrefix, copy, getMetadata and prod lifecycle rules
- Add deleteByPrefix(prefix) for bulk user data deletion (account cleanup) - Add copy(sourceKey, destKey) via CopyObjectCommand for file duplication - Add getMetadata(key) via HeadObjectCommand for content-type/size/metadata - Add FileMetadata type for structured metadata responses - Add minio-init container to docker-compose.macmini.yml with bucket creation, public access policies, and lifecycle rules (matching dev compose) - 96 tests passing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b0e5a9c5ff
commit
152fa5fe08
5 changed files with 191 additions and 0 deletions
|
|
@ -69,6 +69,40 @@ services:
|
|||
timeout: 20s
|
||||
retries: 3
|
||||
|
||||
# MinIO bucket initialization and lifecycle rules (runs once)
|
||||
minio-init:
|
||||
image: minio/mc:latest
|
||||
container_name: mana-infra-minio-init
|
||||
depends_on:
|
||||
minio:
|
||||
condition: service_healthy
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
mc alias set myminio http://minio:9000 $${MINIO_ACCESS_KEY:-minioadmin} $${MINIO_SECRET_KEY:-minioadmin};
|
||||
mc mb --ignore-existing myminio/manacore-storage;
|
||||
mc mb --ignore-existing myminio/picture-storage;
|
||||
mc mb --ignore-existing myminio/chat-storage;
|
||||
mc mb --ignore-existing myminio/manadeck-storage;
|
||||
mc mb --ignore-existing myminio/presi-storage;
|
||||
mc mb --ignore-existing myminio/calendar-storage;
|
||||
mc mb --ignore-existing myminio/contacts-storage;
|
||||
mc mb --ignore-existing myminio/storage-storage;
|
||||
mc mb --ignore-existing myminio/inventory-storage;
|
||||
mc mb --ignore-existing myminio/mukke-storage;
|
||||
mc mb --ignore-existing myminio/planta-storage;
|
||||
mc mb --ignore-existing myminio/projectdoc-storage;
|
||||
mc mb --ignore-existing myminio/mail-storage;
|
||||
mc anonymous set download myminio/manacore-storage;
|
||||
mc anonymous set download myminio/picture-storage;
|
||||
mc anonymous set download myminio/planta-storage;
|
||||
mc anonymous set download myminio/inventory-storage;
|
||||
mc ilm rule add --expire-days 90 myminio/chat-storage --prefix 'tmp/' 2>/dev/null || true;
|
||||
mc ilm rule add --expire-days 30 myminio/calendar-storage --prefix 'tmp/' 2>/dev/null || true;
|
||||
mc ilm rule add --expire-days 7 myminio/picture-storage --prefix 'tmp/' 2>/dev/null || true;
|
||||
echo 'Buckets and lifecycle rules created successfully';
|
||||
exit 0;
|
||||
"
|
||||
|
||||
# ============================================
|
||||
# Tier 1: Core Auth Service (Port 3001)
|
||||
# ============================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue