mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-09-19 21:20:28 +02:00
43c4961116
* Replace envconfig with env * Adjust config options and processing * Added _FILE variant for all password vars. * Try pathenvconfig * Revert everything so far * Use our fork of envconfig with custom lookup * Use our fork of envconfig with custom lookup * Test compose timeout option * Remove secret resolving and specific _FILE config * Fix timing issue in swarm tests * Revert "Test compose timeout option" This reverts commitab50b21748
, reversing changes made to0282514b2b
. Revert "Test compose timeout option" This reverts commit0282514b2b
. * Use offen/envconfig v1.5.0 * Add info about _FILE in README * Value > File. Panic on file error. Panic on duplicate presence. * Test panic on duplicate vars and panic on file error.
39 lines
690 B
Bash
Executable File
39 lines
690 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
cd $(dirname $0)
|
|
. ../util.sh
|
|
current_test=$(basename $(pwd))
|
|
|
|
docker swarm init
|
|
|
|
docker stack deploy --compose-file=docker-compose.yml test_stack
|
|
|
|
while [ -z $(docker ps -q -f name=backup) ]; do
|
|
info "Backup container not ready yet. Retrying."
|
|
sleep 1
|
|
done
|
|
|
|
sleep 20
|
|
|
|
docker exec $(docker ps -q -f name=backup) backup
|
|
|
|
docker run --rm \
|
|
-v backup_data:/data alpine \
|
|
ash -c 'tar -xf /data/backup/test.tar.gz && test -f /backup/pg_data/PG_VERSION'
|
|
|
|
pass "Found relevant files in untared backup."
|
|
|
|
sleep 5
|
|
expect_running_containers "5"
|
|
|
|
docker stack rm test_stack
|
|
sleep 1
|
|
docker swarm leave --force
|
|
|
|
sleep 10
|
|
|
|
docker volume rm backup_data
|
|
docker volume rm pg_data
|