diff --git a/Dockerfile b/Dockerfile index 2c5a7a9..edb64da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ LABEL maintainer="ITBM" RUN apk update \ && apk upgrade \ - && apk add coreutils postgresql17-client aws-cli openssl pigz \ + && apk add coreutils postgresql17-client aws-cli openssl pigz ca-certificates \ && rm -rf /var/cache/apk/* COPY --from=build /app/out/go-cron /usr/local/bin/go-cron @@ -34,6 +34,7 @@ ENV S3_BUCKET **None** ENV S3_REGION us-west-1 ENV S3_PREFIX 'backup' ENV S3_ENDPOINT **None** +ENV S3_SSL_VERIFY true ENV S3_S3V4 no ENV SCHEDULE **None** ENV ENCRYPTION_PASSWORD **None** diff --git a/README.md b/README.md index 7851d1d..9b23347 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ spec: | S3_PREFIX | backup | | Path prefix in your bucket | | S3_REGION | us-west-1 | | The AWS S3 bucket region | | S3_ENDPOINT | | | The AWS Endpoint URL, for S3 Compliant APIs such as [minio](https://minio.io) | +| S3_SSL_VERIFY | | | Check S3 endpoint ssl | | S3_S3V4 | no | | Set to `yes` to enable AWS Signature Version 4, required for [minio](https://minio.io) servers | | SCHEDULE | | | Backup schedule time, see explainatons below | | ENCRYPTION_PASSWORD | | | Password to encrypt/decrypt the backup | diff --git a/backup.sh b/backup.sh index 8fd1932..110d972 100644 --- a/backup.sh +++ b/backup.sh @@ -48,7 +48,11 @@ fi if [ "${S3_ENDPOINT}" == "**None**" ]; then AWS_ARGS="" else - AWS_ARGS="--endpoint-url ${S3_ENDPOINT}" + if [ "${S3_SSL_VERIFY}" == "false" ]; then + AWS_ARGS="--endpoint-url ${S3_ENDPOINT} --no-verify-ssl" + else + AWS_ARGS="--endpoint-url ${S3_ENDPOINT}" + fi fi export AWS_ACCESS_KEY_ID=$S3_ACCESS_KEY_ID