From 3438bcf270583318a57e4ca9a4b0675691e3f28d Mon Sep 17 00:00:00 2001 From: Adam Engebretson Date: Fri, 20 Jan 2017 16:59:24 -0600 Subject: [PATCH] Enabling AWS Signature v4 - Added env S3_S3V4 --- mysql-backup-s3/Dockerfile | 1 + mysql-backup-s3/README.md | 1 + mysql-backup-s3/run.sh | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/mysql-backup-s3/Dockerfile b/mysql-backup-s3/Dockerfile index a4d6006..4ca56bc 100644 --- a/mysql-backup-s3/Dockerfile +++ b/mysql-backup-s3/Dockerfile @@ -15,6 +15,7 @@ ENV S3_SECRET_ACCESS_KEY **None** ENV S3_BUCKET **None** ENV S3_REGION us-west-1 ENV S3_ENDPOINT **None** +ENV S3_S3V4 no ENV S3_PREFIX 'backup' ENV MULTI_FILES no ENV SCHEDULE **None** diff --git a/mysql-backup-s3/README.md b/mysql-backup-s3/README.md index f06eacc..ac3a29f 100644 --- a/mysql-backup-s3/README.md +++ b/mysql-backup-s3/README.md @@ -22,6 +22,7 @@ $ docker run -e S3_ACCESS_KEY_ID=key -e S3_SECRET_ACCESS_KEY=secret -e S3_BUCKET - `S3_PREFIX` path prefix in your bucket (default: 'backup') - `S3_REGION` the AWS S3 bucket region (default: us-west-1) - `S3_ENDPOINT` the AWS Endpoint URL, for S3 Compliant APIs such as [minio](https://minio.io) (default: none) +- `S3_S3V4` set to `yes` to enable AWS Signature Version 4, required for [minio](https://minio.io) servers (default: no) - `MULTI_FILES` Allow to have one file per database if set `yes` default: no) - `SCHEDULE` backup schedule time, see explainatons below diff --git a/mysql-backup-s3/run.sh b/mysql-backup-s3/run.sh index 05dfcaa..8cc86cc 100644 --- a/mysql-backup-s3/run.sh +++ b/mysql-backup-s3/run.sh @@ -2,6 +2,10 @@ set -e +if [ "${S3_S3V4}" = "yes"]; then + aws configure set default.s3.signature_version s3v4 +fi + if [ "${SCHEDULE}" = "**None**" ]; then sh backup.sh else