diff --git a/docker-compose.yml b/docker-compose.yml index ee68d46d..d990b737 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -75,6 +75,8 @@ services: environment: - FORTIS_CASSANDRA_HOST=cassandra - FORTIS_CASSANDRA_PORT=9042 + - BACKUP_INTERVAL=10m + - BACKUP_DELETE_LOOKBACK=30 minutes ago env_file: - .env-secrets diff --git a/project-fortis-backup/docker/Dockerfile b/project-fortis-backup/docker/Dockerfile index fc94d1ab..2d8acfd8 100644 --- a/project-fortis-backup/docker/Dockerfile +++ b/project-fortis-backup/docker/Dockerfile @@ -32,6 +32,7 @@ ENV USER_FILES_BLOB_ACCOUNT_NAME="" ENV USER_FILES_BLOB_ACCOUNT_KEY="" ENV BACKUP_CONTAINER_NAME="backups" ENV BACKUP_DELETE_LOOKBACK="2 weeks ago" +ENV BACKUP_INTERVAL="2h" # a one-node local cassandra is set up via docker-compose, if you wish to use a # larger cluster (e.g. hosted in Azure), just override this variable with the diff --git a/project-fortis-backup/docker/run-backup.sh b/project-fortis-backup/docker/run-backup.sh index 4187ee65..bb1c7bb1 100755 --- a/project-fortis-backup/docker/run-backup.sh +++ b/project-fortis-backup/docker/run-backup.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh while :; do - sleep 60m + sleep "$BACKUP_INTERVAL" /app/backup-cassandra-keyspace.sh settings done