mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-23 05:30:33 +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
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
minio:
|
|
hostname: minio.local
|
|
image: minio/minio:RELEASE.2020-08-04T23-10-51Z
|
|
environment:
|
|
MINIO_ROOT_USER: test
|
|
MINIO_ROOT_PASSWORD: test
|
|
MINIO_ACCESS_KEY: test
|
|
MINIO_SECRET_KEY: GMusLtUmILge2by+z890kQ
|
|
entrypoint: /bin/ash -c 'mkdir -p /data/backup && minio server --certs-dir "/certs" --address ":443" /data'
|
|
volumes:
|
|
- minio_backup_data:/data
|
|
- ${CERT_DIR:-.}/minio.crt:/certs/public.crt
|
|
- ${CERT_DIR:-.}/minio.key:/certs/private.key
|
|
|
|
backup:
|
|
image: offen/docker-volume-backup:${TEST_VERSION:-canary}
|
|
depends_on:
|
|
- minio
|
|
restart: always
|
|
environment:
|
|
BACKUP_FILENAME: test.tar.gz
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: GMusLtUmILge2by+z890kQ
|
|
AWS_ENDPOINT: minio.local:443
|
|
AWS_ENDPOINT_CA_CERT: /root/minio-rootCA.crt
|
|
AWS_S3_BUCKET_NAME: backup
|
|
BACKUP_CRON_EXPRESSION: 0 0 5 31 2 ?
|
|
BACKUP_RETENTION_DAYS: ${BACKUP_RETENTION_DAYS:-7}
|
|
BACKUP_PRUNING_LEEWAY: 5s
|
|
volumes:
|
|
- app_data:/backup/app_data:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ${CERT_DIR:-.}/rootCA.crt:/root/minio-rootCA.crt
|
|
|
|
offen:
|
|
image: offen/offen:latest
|
|
labels:
|
|
- docker-volume-backup.stop-during-backup=true
|
|
volumes:
|
|
- app_data:/var/opt/offen
|
|
|
|
volumes:
|
|
minio_backup_data:
|
|
name: minio_backup_data
|
|
app_data:
|