Skip to content

Commit 7b540a8

Browse files
committed
Fully parameterize backup schedule
Also: exercise backup code-path more frequently when running locally.
1 parent a79f878 commit 7b540a8

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ services:
7575
environment:
7676
- FORTIS_CASSANDRA_HOST=cassandra
7777
- FORTIS_CASSANDRA_PORT=9042
78+
- BACKUP_INTERVAL=10m
79+
- BACKUP_DELETE_LOOKBACK=30 minutes ago
7880
env_file:
7981
- .env-secrets
8082

project-fortis-backup/docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ ENV USER_FILES_BLOB_ACCOUNT_NAME=""
3232
ENV USER_FILES_BLOB_ACCOUNT_KEY=""
3333
ENV BACKUP_CONTAINER_NAME="backups"
3434
ENV BACKUP_DELETE_LOOKBACK="2 weeks ago"
35+
ENV BACKUP_INTERVAL="2h"
3536

3637
# a one-node local cassandra is set up via docker-compose, if you wish to use a
3738
# larger cluster (e.g. hosted in Azure), just override this variable with the
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

33
while :; do
4-
sleep 60m
4+
sleep "$BACKUP_INTERVAL"
55
/app/backup-cassandra-keyspace.sh settings
66
done

0 commit comments

Comments
 (0)