diff --git a/Dockerfile b/Dockerfile index 7e6a3b1..00ab72c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ RUN apk update && apk add python3 dcron mariadb-client postgresql-client ADD . /restic-compose-backup WORKDIR /restic-compose-backup RUN pip3 install -U pip setuptools && pip3 install -e . +ENV XDG_CACHE_HOME=/cache ENTRYPOINT [] CMD ["./entrypoint.sh"] diff --git a/docker-compose.yaml b/docker-compose.yaml index a818764..be56201 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -9,8 +9,8 @@ services: - /var/run/docker.sock:/tmp/docker.sock:ro # Map backup database locally - ./restic_data:/restic_data - - ./restic_cache:/restic_cache - # Map in project source + - ./restic_cache:/cache + # Map in project source in dev - .:/restic-compose-backup web: image: nginx diff --git a/restic_compose_backup/restic.py b/restic_compose_backup/restic.py index a574a84..938f995 100644 --- a/restic_compose_backup/restic.py +++ b/restic_compose_backup/restic.py @@ -97,8 +97,6 @@ def restic(repository: str, args: List[str]): """Generate restic command""" return [ "restic", - "--cache-dir", - "/restic_cache", "-r", repository, ] + args