mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-10 00:30:29 +01:00
Frederik Ring
1e39ac41f4
* Try running tests in Docker * Spawn new container for each test * Store test artifacts outside of mount * When requested, build up to date image in test script * sudo is unneccessary in containerized test env * Skip azure test * Backdate fixture file in JSON database * Pin versions for azure tools * Mount temp volume for /var/lib/docker to prevent dangling ones created by VOLUME instruction * Fail backdating tests with message * Add some documentation on test setup * Cache images * Run compose stacks with shortened default timeout
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
ssh:
|
|
image: linuxserver/openssh-server:version-8.6_p1-r3
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- USER_NAME=test
|
|
volumes:
|
|
- ${KEY_DIR:-.}/id_rsa.pub:/config/.ssh/authorized_keys
|
|
- ssh_backup_data:/tmp
|
|
|
|
backup:
|
|
image: offen/docker-volume-backup:${TEST_VERSION:-canary}
|
|
hostname: hostnametoken
|
|
depends_on:
|
|
- ssh
|
|
restart: always
|
|
environment:
|
|
BACKUP_FILENAME_EXPAND: 'true'
|
|
BACKUP_FILENAME: test-$$HOSTNAME.tar.gz
|
|
BACKUP_CRON_EXPRESSION: 0 0 5 31 2 ?
|
|
BACKUP_RETENTION_DAYS: ${BACKUP_RETENTION_DAYS:-7}
|
|
BACKUP_PRUNING_LEEWAY: 5s
|
|
BACKUP_PRUNING_PREFIX: test
|
|
SSH_HOST_NAME: ssh
|
|
SSH_PORT: 2222
|
|
SSH_USER: test
|
|
SSH_REMOTE_PATH: /tmp
|
|
SSH_IDENTITY_PASSPHRASE: test1234
|
|
volumes:
|
|
- ${KEY_DIR:-.}/id_rsa:/root/.ssh/id_rsa
|
|
- app_data:/backup/app_data:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
offen:
|
|
image: offen/offen:latest
|
|
labels:
|
|
- docker-volume-backup.stop-during-backup=true
|
|
volumes:
|
|
- app_data:/var/opt/offen
|
|
|
|
volumes:
|
|
ssh_backup_data:
|
|
name: ssh_backup_data
|
|
app_data:
|