A simple HTTP File Server implemented using Python, FastAPI, and Docker.
The server exposes HTTP endpoint /files/{file_path}
that returns files from the specified directory.
The server also includes Prometheus metrics exporter from library prometheus-fastapi-instrumentator.
Pull image from the Docker Hub.
docker pull chamidullinr/http-file-server:latest
Or build the docker image.
docker build --tag http-file-server .
Then, run the docker container. Change [DIRECTORY_TO_MOUNT]
with a path to some directory on the host machine.
docker run \
--publish 8080:8080 \
--volume [DIRECTORY_TO_MOUNT]:/Data \
--name http-file-server \
http-file-server
Access files in directory [DIRECTORY_TO_MOUNT]
from URL http://localhost:8080/files/{file_path}
.