feat: add post3 s3 proxy for postgresql

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2026-02-27 11:37:48 +01:00
commit 21bac4a33f
67 changed files with 14403 additions and 0 deletions

107
mise.toml Normal file
View File

@@ -0,0 +1,107 @@
[env]
RUST_LOG = "post3=debug,post3_server=debug,info"
DATABASE_URL = "postgresql://devuser:devpassword@localhost:5435/post3_dev"
POST3_HOST = "127.0.0.1:9000"
[tasks."develop"]
alias = ["d", "dev"]
description = "Run the post3 server in development mode"
run = "cargo run -p post3-server -- serve"
[tasks."build"]
alias = ["b"]
description = "Build the workspace in release mode"
run = "cargo build --release"
[tasks."check"]
alias = ["c"]
description = "Type-check the entire workspace"
run = "cargo check --workspace"
[tasks."local:up"]
alias = ["up"]
description = "Start PostgreSQL via docker compose"
run = "docker compose -f ./templates/docker-compose.yaml up -d --remove-orphans --wait"
[tasks."local:down"]
alias = ["down"]
description = "Stop PostgreSQL and remove volumes"
run = "docker compose -f ./templates/docker-compose.yaml down -v"
[tasks."local:logs"]
description = "Tail PostgreSQL logs"
run = "docker compose -f ./templates/docker-compose.yaml logs -f"
[tasks."db:shell"]
description = "Open a psql shell to the dev database"
env = { PGPASSWORD = "devpassword" }
run = "psql -h localhost -p 5435 -U devuser -d post3_dev"
[tasks."db:reset"]
description = "Drop and recreate the dev database"
run = """
docker compose -f ./templates/docker-compose.yaml down -v
docker compose -f ./templates/docker-compose.yaml up -d --remove-orphans --wait
"""
[tasks."test"]
alias = ["t"]
description = "Run all tests (requires PostgreSQL running)"
depends = ["local:up"]
run = "cargo test --workspace -- --test-threads=1"
[tasks."test:integration"]
alias = ["ti"]
description = "Run S3 integration tests only (requires PostgreSQL running)"
depends = ["local:up"]
run = "cargo test --test s3_integration -- --test-threads=1"
[tasks."test:watch"]
description = "Run tests on file change"
depends = ["local:up"]
run = "cargo watch -x 'test --workspace -- --test-threads=1'"
[tasks."ci:pr"]
description = "Run CI PR pipeline via Dagger"
run = "cargo run -p ci -- pr"
[tasks."ci:main"]
description = "Run CI main pipeline via Dagger"
run = "cargo run -p ci -- main"
[tasks."example:basic"]
description = "Run the basic SDK example (requires server running)"
run = "cargo run -p post3-sdk --example basic"
[tasks."example:metadata"]
description = "Run the metadata example (requires server running)"
run = "cargo run -p post3-sdk --example metadata"
[tasks."example:aws-sdk"]
description = "Run the raw aws-sdk-s3 example (requires server running)"
run = "cargo run -p post3-sdk --example aws_sdk_direct"
[tasks."example:cli"]
description = "Run the AWS CLI example script (requires server running + aws CLI)"
run = "bash examples/aws-cli.sh"
[tasks."example:curl"]
description = "Run the curl example script (requires server running)"
run = "bash examples/curl.sh"
[tasks."example:large"]
description = "Run the large file upload stress test (requires server running)"
run = "cargo run -p post3-sdk --example large_upload --release"
[tasks."example:multipart"]
description = "Run the multipart upload stress test for huge files (requires server running)"
run = "cargo run -p post3-sdk --example multipart_upload --release"
[tasks."test:s3-compliance"]
alias = ["s3t"]
description = "Run Ceph s3-tests against post3 (FS backend)"
run = "bash s3-compliance/run-s3-tests.sh"
[tasks."test:s3-compliance:dry"]
description = "List which s3-tests would run (dry-run)"
run = "bash s3-compliance/run-s3-tests.sh --collect-only"