Docker image that runs a single cron job to sync files with S3 as defined via environment variables.
This image can be used to either sync files from a container to S3 or from S3 to a container.
It is intended that a single instance of this image will run a single cron job and sync process. If you have multiple
directories to sync, then you should run multiple containers each with the appropriate configuration for that directory.
This image is built automatically on the Docker Hub as silintl/sync-with-s3
- Clone this repo
local.envand update values as appropriate
docker-compose up -d
Expected Environment Variables
ACCESS_KEY- AWS Access Key
SECRET_KEY- AWS Secret Access Key
CRON_SCHEDULE- Schedule for cron job, for every 15 minutes it would be:
*/15 * * * *
SOURCE_PATH- Source files to be synced, example:
DESTINATION_PATH- Destination of where to sync files to, example:
BUCKET_LOCATION- AWS Region for bucket, ex:
LOGENTRIES_KEY- (optional) If provided, the image will send command output to syslog with priority
You will need to define volumes in your Docker configuration for sharing filesystem between your application
containers and this sync container.