feat: add restic (#1044)

* feat: add restic

allows incremental snapshot backups
remove custom push-backup script

* ci: remove .git dir to skip fetch_details_from_tag

fixes https://github.com/frappe/frappe_docker/actions/runs/3938883301/jobs/6738091655
This commit is contained in:
Revant Nandgaonkar
2023-01-18 11:31:18 +05:30
committed by GitHub
parent 44df16fd04
commit bb1e4bb341
8 changed files with 41 additions and 247 deletions

View File

@@ -19,6 +19,8 @@ RUN useradd -ms /bin/bash frappe \
libharfbuzz0b \
libpangoft2-1.0-0 \
libpangocairo-1.0-0 \
# For backups
restic \
# MariaDB
mariadb-client \
# Postgres
@@ -62,7 +64,6 @@ RUN useradd -ms /bin/bash frappe \
COPY resources/nginx-template.conf /templates/nginx/frappe.conf.template
COPY resources/nginx-entrypoint.sh /usr/local/bin/nginx-entrypoint.sh
COPY resources/push_backup.py /usr/local/bin/push-backup
FROM base AS builder
@@ -108,7 +109,7 @@ RUN bench init \
bench get-app --branch=${ERPNEXT_BRANCH} --resolve-deps erpnext ${ERPNEXT_REPO} && \
echo "$(jq 'del(.db_host, .redis_cache, .redis_queue, .redis_socketio)' sites/common_site_config.json)" \
> sites/common_site_config.json && \
find apps -name .git -type d -prune | xargs -i git --git-dir {} remote rm upstream
find apps -mindepth 1 -path "*/.git" | xargs rm -fr
FROM base as erpnext