mirror of
https://github.com/hanzoai/s3.git
synced 2026-10-30 14:59:09 +00:00
hanzoai/s3 was an AGPL-3.0 MinIO fork whose network-copyleft blocks embedding
and reselling as a managed service. Replace it wholesale with a fork of
SeaweedFS (github.com/seaweedfs/seaweedfs, Apache-2.0, Go) which ships a
built-in S3 gateway + Filer.
- License: AGPL-3.0 -> Apache-2.0 (upstream LICENSE kept verbatim, incl.
"Copyright 2025 Chris Lu"); NOTICE added crediting SeaweedFS. No AGPL/BUSL/
SSPL/GPL or enterprise ("ee") files remain.
- Module: go.mod path set to github.com/hanzoai/s3 with a self-replace
(replace github.com/seaweedfs/seaweedfs => ./) so the ~1800 internal Go files
keep their upstream import paths with zero churn. Internal identifiers and
import paths are intentionally NOT renamed.
- CLI rebrand: the binary is built as `s3` (was `weed`); root usage, per-command
help/usage/flag strings, shell autocomplete program name, and the product name
in CLI output now read "Hanzo S3" / `s3`. Users never see `weed`.
(e.g. `s3 server`, `s3 filer`, `s3 master`, `s3 volume`, `s3 s3`, `s3 mount`.)
- Build: `make` (or `go build -o s3 ./weed`) builds the `s3` binary green;
`cmd/weed-db` and `cmd/weed-sql` also build; `go vet ./weed/command/` clean.
- README/LLM.md rewritten for Hanzo S3; AGENTS.md/CLAUDE.md symlinks preserved.
- Dropped a 33MB prebuilt Mach-O `stress` binary upstream had committed; `.gitignore`
updated to ignore the `s3` build output.
101 lines
3.0 KiB
YAML
101 lines
3.0 KiB
YAML
version: '3.9'
|
|
|
|
services:
|
|
# Simple single-node FoundationDB for testing
|
|
foundationdb:
|
|
image: foundationdb/foundationdb:7.1.61
|
|
platform: linux/amd64 # Force amd64 platform
|
|
container_name: foundationdb-single
|
|
environment:
|
|
- FDB_NETWORKING_MODE=host
|
|
ports:
|
|
- "4500:4500"
|
|
volumes:
|
|
- fdb_data:/var/fdb/data
|
|
- fdb_config:/var/fdb/config
|
|
networks:
|
|
- test_network
|
|
healthcheck:
|
|
test: ["CMD", "fdbcli", "-C", "/var/fdb/config/fdb.cluster", "--exec", "status"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
start_period: 20s
|
|
command: >
|
|
bash -c "
|
|
echo 'Starting FoundationDB single node...' &&
|
|
echo 'docker:docker@foundationdb:4500' > /var/fdb/config/fdb.cluster &&
|
|
|
|
# Start the server
|
|
/usr/bin/fdbserver --config_path=/var/fdb/config --datadir=/var/fdb/data --logdir=/var/fdb/logs --public_address=foundationdb:4500 --listen_address=0.0.0.0:4500 --class=storage &
|
|
|
|
# Wait a moment for server to start
|
|
sleep 10 &&
|
|
|
|
# Configure the database
|
|
echo 'Configuring database...' &&
|
|
fdbcli -C /var/fdb/config/fdb.cluster --exec 'configure new single memory' &&
|
|
|
|
echo 'FoundationDB ready!' &&
|
|
fdbcli -C /var/fdb/config/fdb.cluster --exec 'status' &&
|
|
|
|
# Keep running
|
|
wait
|
|
"
|
|
|
|
# Test runner with Go environment and FoundationDB dependencies
|
|
test-runner:
|
|
build:
|
|
context: ../..
|
|
dockerfile: test/foundationdb/Dockerfile.test
|
|
depends_on:
|
|
foundationdb:
|
|
condition: service_healthy
|
|
volumes:
|
|
- fdb_config:/var/fdb/config
|
|
- test_results:/test/results
|
|
networks:
|
|
- test_network
|
|
environment:
|
|
- FDB_CLUSTER_FILE=/var/fdb/config/fdb.cluster
|
|
- WEED_FOUNDATIONDB_ENABLED=true
|
|
- WEED_FOUNDATIONDB_CLUSTER_FILE=/var/fdb/config/fdb.cluster
|
|
- WEED_FOUNDATIONDB_API_VERSION=740
|
|
command: >
|
|
bash -c "
|
|
echo 'FoundationDB is ready, starting tests...' &&
|
|
|
|
echo 'Testing FoundationDB connection...' &&
|
|
fdbcli -C /var/fdb/config/fdb.cluster --exec 'status' &&
|
|
|
|
echo 'Running integration tests...' &&
|
|
cd /app/test/foundationdb &&
|
|
|
|
# Run validation tests (always work)
|
|
echo '=== Running Validation Tests ===' &&
|
|
go test -v ./validation_test.go &&
|
|
|
|
# Run mock tests (always work)
|
|
echo '=== Running Mock Integration Tests ===' &&
|
|
go test -v ./mock_integration_test.go &&
|
|
|
|
# Try to run actual integration tests with FoundationDB
|
|
echo '=== Running FoundationDB Integration Tests ===' &&
|
|
go test -tags foundationdb -v . 2>&1 | tee /test/results/integration_test_results.log &&
|
|
|
|
echo 'All tests completed!' &&
|
|
echo 'Results saved to /test/results/' &&
|
|
|
|
# Keep container running for debugging
|
|
tail -f /dev/null
|
|
"
|
|
|
|
volumes:
|
|
fdb_data:
|
|
fdb_config:
|
|
test_results:
|
|
|
|
networks:
|
|
test_network:
|
|
driver: bridge
|