Add MinIO object storage
This commit is contained in:
96
README.md
Normal file
96
README.md
Normal file
@@ -0,0 +1,96 @@
|
||||
# MinIO Object Storage
|
||||
|
||||
S3-compatible object storage for b28.dev infrastructure.
|
||||
|
||||
## Purpose
|
||||
|
||||
- **Backups**: PostgreSQL dumps, Docker volume snapshots
|
||||
- **Media Storage**: Directus file uploads (portfolio + demos)
|
||||
- **Demo Artifacts**: Cached API responses, datasets
|
||||
|
||||
## Deployment
|
||||
|
||||
**URL**: https://objects.b28.dev
|
||||
|
||||
**Ports**:
|
||||
- 9000: S3 API (programmatic access)
|
||||
- 9001: Web Console (admin UI)
|
||||
|
||||
## Configuration
|
||||
|
||||
### Environment Variables
|
||||
|
||||
Copy `.env.example` to `.env` and configure:
|
||||
|
||||
```bash
|
||||
MINIO_ROOT_USER=your-admin-username
|
||||
MINIO_ROOT_PASSWORD=your-strong-password
|
||||
```
|
||||
|
||||
### Credentials
|
||||
|
||||
The same credentials are used for:
|
||||
- S3 API access (boto3, MinIO client, etc.)
|
||||
- Web console login at https://objects.b28.dev
|
||||
|
||||
## Deployment on Coolify
|
||||
|
||||
1. Push this directory to Gitea
|
||||
2. In Coolify, create new resource → Git Repository
|
||||
3. Point to this repo/directory
|
||||
4. Set environment variables
|
||||
5. Deploy
|
||||
|
||||
## Initial Setup
|
||||
|
||||
After deployment:
|
||||
|
||||
1. Login to https://objects.b28.dev
|
||||
2. Create buckets:
|
||||
- `backups` (private)
|
||||
- `directus-uploads` (public-read)
|
||||
- `demo-artifacts` (private)
|
||||
|
||||
3. Create service accounts:
|
||||
- Directus: read/write to `directus-uploads`
|
||||
- Backup scripts: write-only to `backups`
|
||||
|
||||
## Bucket Structure
|
||||
|
||||
```
|
||||
minio/
|
||||
├── backups/
|
||||
│ ├── postgres/ # Daily PostgreSQL dumps
|
||||
│ ├── volumes/ # Docker volume snapshots
|
||||
│ └── configs/ # Infrastructure configs
|
||||
├── directus-uploads/ # Directus file storage
|
||||
│ ├── portfolio/ # Portfolio media
|
||||
│ └── events/ # Events demo media
|
||||
└── demo-artifacts/ # Demo-specific data
|
||||
└── events-demo/
|
||||
├── luma-cache/ # Cached Lu.ma responses
|
||||
└── ai-analysis/ # Cached AI analyses
|
||||
```
|
||||
|
||||
## Access via MinIO Client
|
||||
|
||||
```bash
|
||||
# Configure alias
|
||||
mc alias set homelab https://objects.b28.dev <access-key> <secret-key>
|
||||
|
||||
# List buckets
|
||||
mc ls homelab
|
||||
|
||||
# Upload file
|
||||
mc cp backup.sql homelab/backups/postgres/
|
||||
|
||||
# Download file
|
||||
mc cp homelab/backups/postgres/backup.sql ./
|
||||
```
|
||||
|
||||
## Backup Strategy
|
||||
|
||||
See `/scripts/backup-to-minio.sh` for automated backup implementation.
|
||||
|
||||
**Frequency**: Daily at 2:00 AM UTC
|
||||
**Retention**: 7 daily, 4 weekly, 3 monthly
|
||||
Reference in New Issue
Block a user