Schedule backup MySQL database to S3 compatible storage.
version: "3"
services:
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: db
MYSQL_USER: abc
MYSQL_PASSWORD: abc
backup:
image: joshava/mysql-s3
environment:
MYSQL_HOST: mysql
MYSQL_DATABASE: db
MYSQL_USER: abc
MYSQL_PASSWORD: abc
S3_ACCESS_KEY: <YOUR_KEY>
S3_ACCESS_SECRET: <YOUR_SECRET>
S3_BUCKET: <YOUR_BUCKET>
S3_REGION: sfo2
S3_ENDPOINT: https://sfo2.digitaloceanspaces.com
S3_PREFIX: db
PERIOD: "* 0 * * *"
RUN: "true"