Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up a volume linked to S3 in Docker Cloud with AWS?

I'm running my Play! webapp with Docker Cloud (could also use Rancher) and AWS and I'd like to store all the logs in S3 (via volume). Any ideas on how I could achieve that with minimal effort?

like image 547
radek1st Avatar asked Oct 19 '22 10:10

radek1st


1 Answers

Use docker volumes to store the logs in the host system.

Try S3 aws-cli to sync your local directory with S3 Bucket

aws s3 sync /var/logs/container-logs s3://bucket/ 

create a cron to run it on every minute or so.

Reference: s3 aws-cli

like image 187
Gangaraju Avatar answered Nov 01 '22 15:11

Gangaraju