A Python implementation of a simple file server microservice.
Clone the repository and build it locally using the Dockerfile.
docker build -t lcarnevale/fileserver .
Run the image.
docker run -d --rm --name fileserver \
-e PORT=8085 \
-v /mnt/fileshare:/mnt/fileshare \
-v /var/log/lcarnevale:/opt/app/log \
-p 8085:8085 \
--restart unless-stopped \
lcarnevale/fileserver
Open the log file for watching what is going on.
tail -f /var/log/lcarnevale/fileserver.log
Create a file within the mounted directory and download it using Curl.
curl http://<IP-ADDRESS>:8085/download?filename=<FILENAME> --output <FILENAME>