improve varaible
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
vincent 2023-11-01 18:13:17 +01:00
parent 302782fece
commit e30439f039
3 changed files with 12 additions and 3 deletions

View File

@ -1,4 +1,6 @@
FROM vault:1.13.3 FROM vault:1.13.3
ENV VAULT_ADDR="http://active.vault.service.consul:8200"
ENV RETENTION=30
COPY vault-backup.sh / COPY vault-backup.sh /
CMD ./vault-backup.sh CMD ./vault-backup.sh
VOLUME /backup VOLUME /backup

View File

@ -1,11 +1,21 @@
# docker-vault-backup # docker-vault-backup
perform a backup of vault raft base perform a backup of vault raft base
need an vautl approle authentification with following policie
```terraform
rule {
path = "sys/storage/raft/snapshot"
capabilities = ["read"]
}
```
## ENV variable ## ENV variable
- VAULT_APPROLEID - VAULT_APPROLEID
- VAULT_SECRETID - VAULT_SECRETID
- RETENTION
- VAULT_ADDR
## mount ## mount

View File

@ -2,9 +2,6 @@
export PATH_SNAPSHOT="/backup" export PATH_SNAPSHOT="/backup"
export PATH_DIR="daily" export PATH_DIR="daily"
export PATH_BACKUP=$PATH_SNAPSHOT"/"$PATH_DIR export PATH_BACKUP=$PATH_SNAPSHOT"/"$PATH_DIR
export VAULT_ADDR="http://active.vault.service.consul:8200"
export RETENTION=30
export ENV="0" # (0 = staging, 1 = production)
export SNAPSHOT_FILE=$(date +%Y-%m-%d) export SNAPSHOT_FILE=$(date +%Y-%m-%d)