Use XDG_CACHE_HOME to control cache dir
This commit is contained in:
parent
4e480ed8e0
commit
38c59b2436
|
@ -5,6 +5,7 @@ RUN apk update && apk add python3 dcron mariadb-client postgresql-client
|
||||||
ADD . /restic-compose-backup
|
ADD . /restic-compose-backup
|
||||||
WORKDIR /restic-compose-backup
|
WORKDIR /restic-compose-backup
|
||||||
RUN pip3 install -U pip setuptools && pip3 install -e .
|
RUN pip3 install -U pip setuptools && pip3 install -e .
|
||||||
|
ENV XDG_CACHE_HOME=/cache
|
||||||
|
|
||||||
ENTRYPOINT []
|
ENTRYPOINT []
|
||||||
CMD ["./entrypoint.sh"]
|
CMD ["./entrypoint.sh"]
|
||||||
|
|
|
@ -9,8 +9,8 @@ services:
|
||||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||||
# Map backup database locally
|
# Map backup database locally
|
||||||
- ./restic_data:/restic_data
|
- ./restic_data:/restic_data
|
||||||
- ./restic_cache:/restic_cache
|
- ./restic_cache:/cache
|
||||||
# Map in project source
|
# Map in project source in dev
|
||||||
- .:/restic-compose-backup
|
- .:/restic-compose-backup
|
||||||
web:
|
web:
|
||||||
image: nginx
|
image: nginx
|
||||||
|
|
|
@ -97,8 +97,6 @@ def restic(repository: str, args: List[str]):
|
||||||
"""Generate restic command"""
|
"""Generate restic command"""
|
||||||
return [
|
return [
|
||||||
"restic",
|
"restic",
|
||||||
"--cache-dir",
|
|
||||||
"/restic_cache",
|
|
||||||
"-r",
|
"-r",
|
||||||
repository,
|
repository,
|
||||||
] + args
|
] + args
|
||||||
|
|
Loading…
Reference in New Issue