yeenserve
yeenserve is a simple web app written in Rust that serves random images from a directory. It was written as the backing application for hyena.photos, as I wanted to replace the NGINX random index module that I had been using up until now.
The backend supports PNG (png extension) and JPEG (jpg and jpeg extensions) files, but support for other files can be easily added if requested.
Configuration
yeenserve supports both file-based and S3-based provider backends, and is controlled by the YEENSERVE_BACKEND
environment variable. See all the options below.
Name | Default | Backend | Description |
---|---|---|---|
YEENSERVE_BACKEND | file | N/A | Type of backend to get files from. Options are [file, s3]. |
YEENSERVE_PATH | resources/ | file | Path containing files to serve. |
YEENSERVE_S3_BUCKET | Required | s3 | S3 bucket to pull files from. |
YEENSERVE_S3_REGION | Required | s3 | S3 region where the bucket is located. |
YEENSERVE_S3_ENDPOINT | Required | s3 | S3 endpoint used to contact the S3 API. Currently required for all providers, even AWS S3 themselves. |
YEENSERVE_S3_ACCESS_KEY | Required | s3 | S3 access key used to authenticate with the S3 API. |
YEENSERVE_S3_SECRET_KEY | Required | s3 | S3 secret key used to authenticate with the S3 API. |