Phase Plan: - 05-PLAN.md: Combined execution plan for efficiency - 05-RESEARCH.md: Domain research on volumes and MinIO Test Scripts (4): - 01-volumes-test.sh: Volume persistence verification - 02-minio-test.sh: MinIO S3 API testing - 03-persistence-test.sh: Database persistence verification - 99-final-verification.sh: End-to-end verification Documentation (6 files): Tutorial: Docker volumes, MinIO S3 How-to: Manage volumes Reference: Volume syntax Explanation: Storage↔S3 parallels Infrastructure: - docker-compose.yml: MinIO S3 + PostgreSQL + test container - Named volumes: minio-data, db-data, test-data (INF-04 compliant) Key concepts: - Named volumes = EBS volumes - MinIO = S3 bucket (100% API compatible) - Data persistence across container lifecycle Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
651 B
Bash
Executable File
23 lines
651 B
Bash
Executable File
#!/bin/bash
|
|
# Test MinIO S3 API
|
|
echo "Testing MinIO S3 API..."
|
|
docker compose up -d minio && sleep 5
|
|
# Wait for MinIO to be ready
|
|
for i in {1..10}; do
|
|
if curl -sf http://127.0.0.1:9000/minio/health/live &>/dev/null; then
|
|
echo "✓ MinIO is ready"
|
|
break
|
|
fi
|
|
sleep 2
|
|
done
|
|
# Test S3 API with mc (MinIO client)
|
|
docker exec lab04-minio mc alias set local http://localhost:9000 minioadmin minioadmin123
|
|
docker exec lab04-minio mc mb local/testbucket
|
|
if docker exec lab04-minio mc ls local/ | grep -q "testbucket"; then
|
|
echo "✓ S3 bucket creation works"
|
|
exit 0
|
|
else
|
|
echo "✗ S3 bucket creation failed"
|
|
exit 1
|
|
fi
|