Not all S3 providers have automatic deletion capabilities, so this is an inefficient little sidecar to list out and delete all files in an S3 bucket periodically. It's also a little playground I used to learn about building distroless images.
Required environment variables to set are:
S3_BUCKET
- ex.mybucket
, what the name of your bucket isS3_REGION
- ex.us-east-1
, what region your bucket is inS3_ENDPOINT_URL
- ex.https://s3.us-east-1.amazonaws.com
, your S3 provider's APIS3_ACCESS_KEY_ID
- ex.AKIA...
, your access key IDS3_SECRET_KEY
- ex.wJal...
, your secret keyRECYCLER_SLEEP
- ex.3600
, how long to sleep (in seconds) before deleting all known objects
Optional environment variables to set are:
RECYCLER_STARTUP_HOLD
- ex.60
, how long to sleep (in seconds) when the container first starts