try-rustfs/justfile
Waylon S. Walker cfb1afd560 Initial Commit for try-rustfs
Looking for a minio alternative and trying out rustfs
2025-11-02 20:47:20 -06:00

32 lines
830 B
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
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