EPUB Upload & Storage
15 min read
Run SeaweedFS Locally
Run SeaweedFS Locally
Task
Add the local object-storage service used by Readly development.
Docker Compose
Add SeaweedFS to the project’s local services using the chrislus/seaweedfs:latest image and expose its S3-compatible endpoint.
A minimal service can follow this shape:
services:
seaweedfs:
image: chrislus/seaweedfs:latest
command: "server -s3"
ports:
- "8333:8333"
- "8888:8888"
Keep the exact ports aligned with your existing Docker Compose file.
Environment
Use the local endpoint in .env:
S3_ENDPOINT=http://localhost:8333
S3_REGION=us-east-1
S3_ACCESS_KEY=Admin
S3_SECRET_KEY=
S3_BUCKET=readly
The local development setup may use the SeaweedFS Admin access key. Production should use separately provisioned credentials and a separately provisioned bucket.
Test
Start the service:
docker compose up -d
Confirm the S3 endpoint is reachable before writing application upload code.
Checkpoint
Readly has a local, persistent-through-Docker object-storage service ready for the upload layer.