Skip to content

A program which will recursively watch a directory for new files and upload them to S3

Notifications You must be signed in to change notification settings

willdady/go-watch-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-watch-s3

Watches a directory recursively for new files and uploads them to S3.

Configuration

Configuration is controlled by environment variables.

WATCH_PATH

Absolute path to directory to watch. Must include trailing slash. e.g. /absolute/path/to/files/

AWS_REGION

AWS region e.g. ap-southeast-2

AWS_S3_BUCKET

Name of S3 bucket files will be uploaded to e.g. mybucket.example.com

AWS_S3_KEY_PREFIX (Optional)

String to prepend to file names when constructing keys. Defaults to an empty string.

AWS_S3_STORAGE_CLASS (Optional)

S3 storage class used for storing objects. Can be STANDARD, STANDARD_IA or ONEZONE_IA. Defaults to STANDARD.

WATCH_INTERVAL (Optional)

Duration in milliseconds specifying how often the watch directory should be polled for new files. Defaults to 500.

PATH_PATTERN (Optional)

A regular expression used to filter paths. For example "mp4$" would only upload files ending with "mp4". Defaults to an empty string.

Docker

Build Docker image by running the following from the repository root.

docker build -t willdady/go-watch-s3:latest .

About

A program which will recursively watch a directory for new files and upload them to S3

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published