Files
s3/test/foundationdb/docker-compose.yml
zooqueen dd74d3e6d6 Replace AGPL MinIO fork with Apache-2.0 SeaweedFS fork; rebrand CLI weed->s3
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.
2026-06-18 23:41:25 -07:00

129 lines
3.6 KiB
YAML

services:
fdb1:
image: ${FOUNDATIONDB_IMAGE:-foundationdb/foundationdb:7.1.61}
environment:
- FDB_CLUSTER_FILE_CONTENTS
- FDB_NETWORKING_MODE=container
- FDB_COORDINATOR_PORT=${FDB_PORT:-4500}
- FDB_PORT=${FDB_PORT:-4500}
networks:
- fdb_network
healthcheck:
test: [ "CMD", "nc", "-z", "127.0.0.1", "4500" ]
interval: 5s
timeout: 5s
retries: 60
fdb2:
image: ${FOUNDATIONDB_IMAGE:-foundationdb/foundationdb:7.1.61}
environment:
- FDB_CLUSTER_FILE_CONTENTS
- FDB_NETWORKING_MODE=container
- FDB_COORDINATOR_PORT=${FDB_PORT:-4500}
- FDB_PORT=${FDB_PORT:-4500}
networks:
- fdb_network
healthcheck:
test: [ "CMD", "nc", "-z", "127.0.0.1", "4500" ]
interval: 5s
timeout: 5s
retries: 60
fdb3:
image: ${FOUNDATIONDB_IMAGE:-foundationdb/foundationdb:7.1.61}
environment:
- FDB_CLUSTER_FILE_CONTENTS
- FDB_NETWORKING_MODE=container
- FDB_COORDINATOR_PORT=${FDB_PORT:-4500}
- FDB_PORT=${FDB_PORT:-4500}
networks:
- fdb_network
healthcheck:
test: [ "CMD", "nc", "-z", "127.0.0.1", "4500" ]
interval: 5s
timeout: 5s
retries: 60
# Initialize and configure the database
fdb-init:
image: ${FOUNDATIONDB_IMAGE:-foundationdb/foundationdb:7.1.61}
configs:
- target: /var/fdb/config/fdb.cluster
source: fdb.cluster
environment:
- FDB_CLUSTER_FILE=/var/fdb/config/fdb.cluster
networks:
- fdb_network
depends_on:
fdb1:
condition: service_healthy
fdb2:
condition: service_healthy
fdb3:
condition: service_healthy
entrypoint: |
bash -c "
set -o errexit
# Wait for cluster to be ready
sleep 10
# Configure database
echo 'Initializing FoundationDB database...'
if ! fdbcli --exec 'configure new single ssd' >/tmp/fdbcli.out 2>&1; then
if ! grep -qi 'ERROR: Database already exists!' /tmp/fdbcli.out >/dev/null 2>/dev/null; then
echo 'ERROR: Database initialization failed!' >&2
cat /tmp/fdbcli.out >&2
exit 1
fi
fi
# Wait for configuration to complete
sleep 5
# Verify cluster status
fdbcli --exec 'status'
echo 'FoundationDB cluster initialization complete!'
"
# SeaweedFS service with FoundationDB filer
seaweedfs:
image: ${SEAWEEDFS_IMAGE:-chrislusf/seaweedfs:latest}
depends_on:
fdb-init:
condition: service_completed_successfully
networks:
- fdb_network
ports:
- "9333:9333"
- "19333:19333"
- "8888:8888"
- "8333:8333"
- "18888:18888"
configs:
- target: /var/fdb/config/fdb.cluster
source: fdb.cluster
volumes:
- ./s3.json:/etc/seaweedfs/s3.json
- ./filer.toml:/etc/seaweedfs/filer.toml
environment:
- WEED_LEVELDB2_ENABLED
- WEED_FOUNDATIONDB_ENABLED
- WEED_FOUNDATIONDB_CLUSTER_FILE
- WEED_FOUNDATIONDB_API_VERSION
- WEED_FOUNDATIONDB_TIMEOUT
- WEED_FOUNDATIONDB_MAX_RETRY_DELAY
- WEED_MASTER_VOLUME_GROWTH_COPY_1=1
- WEED_MASTER_VOLUME_GROWTH_COPY_OTHER=1
command: "weed server -ip=seaweedfs -filer -master.volumeSizeLimitMB=16 -volume.max=0 -volume -volume.preStopSeconds=1 -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8333 -s3.allowDeleteBucketNotEmpty=false"
configs:
fdb.cluster:
content: |
${FDB_CLUSTER_FILE_CONTENTS:-docker:docker@fdb1:4500,fdb2:4500,fdb3:4500}
networks:
fdb_network:
driver: bridge