-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.restore.yml
32 lines (29 loc) · 1.2 KB
/
compose.restore.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Restoring from a backup into development environment
# Separate file to avoid running the restore services when using docker-compose up
# docker compose -f compose.restore.yml --env-file restic.env run --rm restore_files
name: ${APP_NAMESPACE}
services:
restore_files:
# Keep the same hostname for all Restic services
hostname: restic-api-backup
image: restic/restic:latest
environment:
AWS_ACCESS_KEY_ID: ${S3_ACCESS_KEY}
AWS_SECRET_ACCESS_KEY: ${S3_SECRET_KEY}
S3_STORAGE_CLASS: ${S3_STORAGE_CLASS}
RESTIC_REPOSITORY: ${RESTIC_REPOSITORY}
RESTIC_PASSWORD: ${RESTIC_PASSWORD}
volumes:
# If no restore needed, this volume should remain read-only
- ./public/files:/srv/public/files
- ./public/assets:/srv/public/assets
- ./var/files:/srv/var/files
- restic_cache:/root/.cache/restic
# Restore all files in place
command: 'restore latest --path /srv --target /'
restore_mysql:
extends:
service: restore_files
command: 'restore latest --path ${MYSQL_DUMP_FILENAME} --target /srv/var/files'
volumes:
restic_cache: