Schedule backup PostgreSQL database to S3 compatible storage.
version: "3"
services:
postgres:
image: postgres
environment:
POSTGRES_DB: db
POSTGRES_USER: abc
POSTGRES_PASSWORD: abc
backup:
image: joshava/postgres-s3
environment:
POSTGRES_HOST: postgres
POSTGRES_DATABASE: db
POSTGRES_USER: abc
POSTGRES_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"