Container for exposing persistent state to containers running in Fly.io machines
6.5K
A Docker image for a high-performance, durable storage solution using JuiceFS with S3 backend and Litestream for SQLite replication.
This container image provides a complete storage solution that:
The following environment variables MUST be set for the container to function:
| Variable | Description |
|---|---|
S3_ACCESS_KEY | S3 access key for storage access |
S3_SECRET_KEY | S3 secret key for storage access |
S3_ENDPOINT | S3 endpoint URL (without https:// prefix) |
BUCKET_NAME | S3 bucket name for storage |
S3_REGION | S3 region (if applicable) |
| Variable | Description | Default |
|---|---|---|
META_URL | SQLite database path for JuiceFS metadata | sqlite3://dev/fly_vol/juicefs.db |
MOUNT_POINT | Where JuiceFS will be mounted | /data |
CACHE_DIR | Directory for JuiceFS cache | /dev/fly_vol/cache |
Important: This container requires FUSE privileges to function properly. When running the container, you must:
--privileged flag OR--device /dev/fuse --cap-add SYS_ADMIN flagsdocker run -d \
--name app-storage \
--device /dev/fuse \
--cap-add SYS_ADMIN \
-e S3_ACCESS_KEY=your_access_key \
-e S3_SECRET_KEY=your_secret_key \
-e S3_ENDPOINT=your.s3.endpoint.com \
-e BUCKET_NAME=your-bucket-name \
-e S3_REGION=your-region \
flyio/app-storage:latest
version: '3'
services:
storage:
image: flyio/app-storage:latest
privileged: true # For FUSE access
environment:
- S3_ACCESS_KEY=your_access_key
- S3_SECRET_KEY=your_secret_key
- S3_ENDPOINT=your.s3.endpoint.com
- BUCKET_NAME=your-bucket-name
- S3_REGION=your-region
volumes:
- ./persistent_vol:/dev/fly_vol # For caching and metadata persistence
Once running, the container will:
/data)If you encounter issues:
MIT
Content type
Image
Digest
sha256:a7e93f4cd…
Size
280.4 MB
Last updated
over 1 year ago
docker pull flyio/app-storage