Skip to content

A simple HTTP File Server for retriving files from the specified directory.

Notifications You must be signed in to change notification settings

chamidullinr/http-file-server

Repository files navigation

HTTP File Server

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.

Get Started

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}.

About

A simple HTTP File Server for retriving files from the specified directory.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages