diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index 8f2b52c4..1fedda61 100755 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -1,4 +1,27 @@ services: + # Service for running shedule job to backup timescaledb + # https://github.com/mcuadros/ofelia + ofelia: + image: ${OFELIA_IMAGE} + depends_on: + timescaledb: + condition: service_healthy + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + - ${OFELIA_LOGS}:/tmp/logs:rw + command: daemon --docker + env_file: + - path: .env + labels: + # Save logs locally and via email reports + ofelia.save-folder: "./tmp/logs" + ofelia.smtp-host: "${OFELIA_SMTP_HOST}" + ofelia.smtp-port: "${OFELIA_SMTP_PORT}" + ofelia.smtp-user: "${OFELIA_SMTP_USER}" + ofelia.smtp-password: "${OFELIA_SMTP_PASSWORD}" + ofelia.email-to: "${OFELIA_EMAIL_TO}" + ofelia.email-from: "${OFELIA_EMAIL_FROM}" + timescaledb: image: ${TIMESCALEDB_IMAGE} ports: @@ -34,32 +57,11 @@ services: ofelia.job-exec.full-backup.schedule: "0 0 * * *" ofelia.job-exec.full-backup.command: "pgbackrest --stanza=db --type=full --log-level-stderr=info backup" # Perform diff backup every 15 minutes (900 seconds) - ofelia.job-exec.diff-backup.schedule: "@every 60s" + ofelia.job-exec.diff-backup.schedule: "@every 900s" ofelia.job-exec.diff-backup.user: "postgres" ofelia.job-exec.diff-backup.command: "pgbackrest --stanza=db --type=diff --log-level-stderr=info backup" - # Service for running shedule job to backup timescaledb - # https://github.com/mcuadros/ofelia - ofelia: - image: ${OFELIA_IMAGE} - depends_on: - timescaledb: - condition: service_healthy - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - - ${OFELIA_LOGS}:/tmp/logs:rw - command: daemon --docker - env_file: - - path: .env - labels: - # Save logs locally and via email reports - ofelia.save-folder: "./tmp/logs" - ofelia.smtp-host: "${OFELIA_SMTP_HOST}" - ofelia.smtp-port: "${OFELIA_SMTP_PORT}" - ofelia.smtp-user: "${OFELIA_SMTP_USER}" - ofelia.smtp-password: "${OFELIA_SMTP_PASSWORD}" - ofelia.email-to: "${OFELIA_EMAIL_TO}" - ofelia.email-from: "${OFELIA_EMAIL_FROM}" +