41 lines
1 KiB
Makefile
41 lines
1 KiB
Makefile
set dotenv-load
|
|
|
|
start:
|
|
mkdir -p data
|
|
mkdir -p logs
|
|
podman run -d -p 9000:9000 -v $(pwd)/data:/data -v $(pwd)/logs:/logs docker.io/rustfs/rustfs:alpha
|
|
|
|
start-minio:
|
|
podman run -d -p 9000:9000 -p 9001:9001 -v $(pwd)/data:/data -v $(pwd)/logs:/logs docker.io/minio/minio server /data
|
|
|
|
make-bucket:
|
|
#!/bin/bash
|
|
set +e
|
|
uv run --with awscli aws s3 mb s3://learn-rustfs || true
|
|
uv run --with awscli aws s3 mb s3://dropper || true
|
|
|
|
list-buckets:
|
|
uv run --with awscli aws s3 ls
|
|
|
|
sync-dropper:
|
|
uv run --with awscli aws s3 sync ../dropper/data s3://dropper
|
|
|
|
list-dropper:
|
|
uv run --with awscli aws s3 ls s3://dropper
|
|
|
|
get-presigned-url:
|
|
uv run --with awscli aws s3 presign s3://learn-rustfs/hello.txt
|
|
|
|
post-presigned-url:
|
|
#!/bin/bash
|
|
echo "hello" > hello.txt
|
|
URL=$(uv run --with awscli aws s3 presign "s3://learn-rustfs/hello.txt" --expires-in 600 --http-method PUT)
|
|
echo $URL
|
|
curl -X PUT -T hello.txt $URL
|
|
|
|
ls:
|
|
aws s3 ls
|
|
aws s3 ls s3://dropper
|
|
|
|
createtoken:
|
|
./managetoken.py
|