feat: expand superadmin edits and minio docs
This commit is contained in:
65
docs/storage_minio_smoke_test.md
Normal file
65
docs/storage_minio_smoke_test.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# MinIO Storage Smoke Test
|
||||
|
||||
This note records local MinIO setup for S3-compatible storage simulation.
|
||||
|
||||
## Docker setup (local)
|
||||
|
||||
Image sources used in this environment:
|
||||
- `docker.hub.ipao.vip/minio/minio:latest`
|
||||
- `docker.hub.ipao.vip/minio/mc:latest`
|
||||
|
||||
Start MinIO (console on 9001):
|
||||
|
||||
```bash
|
||||
sudo -n docker run -d --name quyun-minio \
|
||||
-p 9000:9000 -p 9001:9001 \
|
||||
-e MINIO_ROOT_USER=minioadmin \
|
||||
-e MINIO_ROOT_PASSWORD=minioadmin \
|
||||
docker.hub.ipao.vip/minio/minio:latest server /data --console-address ":9001"
|
||||
```
|
||||
|
||||
## Bucket init
|
||||
|
||||
```bash
|
||||
mkdir -p /tmp/quyun-mc
|
||||
sudo -n docker run --rm --network host -v /tmp/quyun-mc:/root/.mc docker.hub.ipao.vip/minio/mc:latest \
|
||||
alias set local http://127.0.0.1:9000 minioadmin minioadmin
|
||||
sudo -n docker run --rm --network host -v /tmp/quyun-mc:/root/.mc docker.hub.ipao.vip/minio/mc:latest \
|
||||
mb -p local/quyun-assets
|
||||
sudo -n docker run --rm --network host -v /tmp/quyun-mc:/root/.mc docker.hub.ipao.vip/minio/mc:latest \
|
||||
ls local
|
||||
```
|
||||
|
||||
## Config sample
|
||||
|
||||
```toml
|
||||
[Storage]
|
||||
Type = "s3"
|
||||
AccessKey = "minioadmin"
|
||||
SecretKey = "minioadmin"
|
||||
Region = "us-east-1"
|
||||
Bucket = "quyun-assets"
|
||||
Endpoint = "http://127.0.0.1:9000"
|
||||
PathStyle = true
|
||||
```
|
||||
|
||||
Use the bundled config file for local runs:
|
||||
|
||||
```bash
|
||||
ENV_LOCAL=minio make serve
|
||||
```
|
||||
|
||||
## Smoke test (optional)
|
||||
|
||||
```bash
|
||||
sudo -n docker run --rm --network host -v /tmp/quyun-mc:/root/.mc -v "$(pwd)":/work -w /work docker.hub.ipao.vip/minio/mc:latest \
|
||||
cp ./README.md local/quyun-assets/smoke/README.md
|
||||
sudo -n docker run --rm --network host -v /tmp/quyun-mc:/root/.mc docker.hub.ipao.vip/minio/mc:latest \
|
||||
ls local/quyun-assets/smoke
|
||||
```
|
||||
|
||||
## Cleanup
|
||||
|
||||
```bash
|
||||
sudo -n docker rm -f quyun-minio
|
||||
```
|
||||
Reference in New Issue
Block a user