A Dockerized FastAPI application for temporary file storage with:
- 5GB max file size
- 24-hour automatic expiration
- Distributed across multiple storage volumes
- File upload with automatic expiration
- File download and metadata retrieval
- Storage statistics monitoring
- Distributed across /storage, /storage2, /storage3
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/yourusername/temp-file-api.git cd temp-file-api -
Build and run the containers:
docker-compose up -d --build
-
The API will be available at
http://localhost:8000
After starting the service, access the interactive docs at:
http://localhost:8000/docs
Environment variables:
MAX_FILE_SIZE: Maximum file size in bytes (default: 5368709120 = 5GB)DEFAULT_EXPIRY: Default expiration time in seconds (default: 86400 = 24h)
This repository includes GitHub Actions to:
- Build and test the Docker image on push
- Push to Docker Hub on release
MIT