mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2026-05-14 06:07:31 +00:00
Compare commits
1 Commits
8263f3ef7f
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bcac8ba51 |
@@ -1,3 +1,4 @@
|
|||||||
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
backup:
|
backup:
|
||||||
build: ./src
|
build: ./src
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
|
|
||||||
DOCKER_HOST=unix://var/run/docker.sock
|
|
||||||
# DOCKER_TLS_VERIFY=1
|
|
||||||
# DOCKER_CERT_PATH=''
|
|
||||||
|
|
||||||
INCLUDE_PROJECT_NAME=false
|
|
||||||
EXCLUDE_BIND_MOUNTS=false
|
|
||||||
|
|
||||||
# storj bucket must exist
|
|
||||||
RESTIC_REPOSITORY=rclone:uplink:mybucket
|
|
||||||
RESTIC_PASSWORD="password"
|
|
||||||
|
|
||||||
RCLONE_CONFIG_UPLINK_TYPE=storj
|
|
||||||
# access grant must have permission to use bucket
|
|
||||||
RCLONE_CONFIG_UPLINK_ACCESS_GRANT=
|
|
||||||
|
|
||||||
RESTIC_KEEP_DAILY=7
|
|
||||||
RESTIC_KEEP_WEEKLY=4
|
|
||||||
RESTIC_KEEP_MONTHLY=12
|
|
||||||
RESTIC_KEEP_YEARLY=3
|
|
||||||
|
|
||||||
LOG_LEVEL=info
|
|
||||||
CRON_SCHEDULE="10 2 * * *"
|
|
||||||
|
|
||||||
# EMAIL_HOST=
|
|
||||||
# EMAIL_PORT=
|
|
||||||
# EMAIL_HOST_USER=
|
|
||||||
# EMAIL_HOST_PASSWORD=
|
|
||||||
# EMAIL_SEND_TO=
|
|
||||||
|
|
||||||
# DISCORD_WEBHOOK=u
|
|
||||||
|
|
||||||
# Various env vars for restic : https://restic.readthedocs.io/en/stable/040_backup.html#environment-variables
|
|
||||||
# RESTIC_REPOSITORY Location of repository (replaces -r)
|
|
||||||
# RESTIC_PASSWORD_FILE Location of password file (replaces --password-file)
|
|
||||||
# RESTIC_PASSWORD The actual password for the repository
|
|
||||||
#
|
|
||||||
# AWS_ACCESS_KEY_ID Amazon S3 access key ID
|
|
||||||
# AWS_SECRET_ACCESS_KEY Amazon S3 secret access key
|
|
||||||
#
|
|
||||||
# ST_AUTH Auth URL for keystone v1 authentication
|
|
||||||
# ST_USER Username for keystone v1 authentication
|
|
||||||
# ST_KEY Password for keystone v1 authentication
|
|
||||||
#
|
|
||||||
# OS_AUTH_URL Auth URL for keystone authentication
|
|
||||||
# OS_REGION_NAME Region name for keystone authentication
|
|
||||||
# OS_USERNAME Username for keystone authentication
|
|
||||||
# OS_PASSWORD Password for keystone authentication
|
|
||||||
# OS_TENANT_ID Tenant ID for keystone v2 authentication
|
|
||||||
# OS_TENANT_NAME Tenant name for keystone v2 authentication
|
|
||||||
#
|
|
||||||
# OS_USER_DOMAIN_NAME User domain name for keystone authentication
|
|
||||||
# OS_PROJECT_NAME Project name for keystone authentication
|
|
||||||
# OS_PROJECT_DOMAIN_NAME PRoject domain name for keystone authentication
|
|
||||||
#
|
|
||||||
# OS_STORAGE_URL Storage URL for token authentication
|
|
||||||
# OS_AUTH_TOKEN Auth token for token authentication
|
|
||||||
#
|
|
||||||
# B2_ACCOUNT_ID Account ID or applicationKeyId for Backblaze B2
|
|
||||||
# B2_ACCOUNT_KEY Account Key or applicationKey for Backblaze B2
|
|
||||||
#
|
|
||||||
# AZURE_ACCOUNT_NAME Account name for Azure
|
|
||||||
# AZURE_ACCOUNT_KEY Account key for Azure
|
|
||||||
#
|
|
||||||
# GOOGLE_PROJECT_ID Project ID for Google Cloud Storage
|
|
||||||
# GOOGLE_APPLICATION_CREDENTIALS Application Credentials for Google Cloud Storage (e.g. $HOME/.config/gs-secret-restic-key.json)
|
|
||||||
#
|
|
||||||
# RCLONE_BWLIMIT rclone bandwidth limit
|
|
||||||
# RCLONE_VERBOSE=1 # 2 for -vv
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
services:
|
|
||||||
backup:
|
|
||||||
build: ../../src
|
|
||||||
env_file:
|
|
||||||
- backup.env
|
|
||||||
labels:
|
|
||||||
restic-compose-backup.volumes: false
|
|
||||||
volumes:
|
|
||||||
# Map in docker socket
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
# Map restic cache
|
|
||||||
- ./restic_cache:/cache
|
|
||||||
postgres:
|
|
||||||
image: postgres:12
|
|
||||||
env_file:
|
|
||||||
- postgres.env
|
|
||||||
labels:
|
|
||||||
restic-compose-backup.postgres: true
|
|
||||||
volumes:
|
|
||||||
- pgdata:/var/lib/postgresql/data
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
pgdata:
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
POSTGRES_USER=pguser
|
|
||||||
POSTGRES_PASSWORD=pgpassword
|
|
||||||
POSTGRES_DB=test
|
|
||||||
@@ -1,22 +1,14 @@
|
|||||||
FROM rclone/rclone:1 AS rclone
|
FROM restic/restic:0.9.6
|
||||||
|
|
||||||
FROM restic/restic:0.16.4 AS restic
|
RUN apk update && apk add python3 \
|
||||||
|
dcron \
|
||||||
FROM python:3.12-alpine
|
mariadb-client \
|
||||||
|
postgresql-client \
|
||||||
COPY --from=rclone /usr/local/bin/rclone /usr/local/bin/rclone
|
mariadb-connector-c-dev
|
||||||
COPY --from=restic /usr/bin/restic /usr/local/bin/restic
|
|
||||||
|
|
||||||
RUN apk update \
|
|
||||||
&& apk add \
|
|
||||||
dcron \
|
|
||||||
mariadb-client \
|
|
||||||
postgresql-client \
|
|
||||||
mariadb-connector-c-dev
|
|
||||||
|
|
||||||
ADD . /restic-compose-backup
|
ADD . /restic-compose-backup
|
||||||
WORKDIR /restic-compose-backup
|
WORKDIR /restic-compose-backup
|
||||||
RUN pip install -U pip setuptools wheel && pip install .
|
RUN pip3 install -U pip setuptools wheel && pip3 install -e .
|
||||||
ENV XDG_CACHE_HOME=/cache
|
ENV XDG_CACHE_HOME=/cache
|
||||||
|
|
||||||
ENTRYPOINT []
|
ENTRYPOINT []
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ setup(
|
|||||||
'restic_compose_backup.*',
|
'restic_compose_backup.*',
|
||||||
]),
|
]),
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'docker~=7.1.0',
|
'docker~=6.1.3',
|
||||||
],
|
],
|
||||||
entry_points={'console_scripts': [
|
entry_points={'console_scripts': [
|
||||||
'restic-compose-backup = restic_compose_backup.cli:main',
|
'restic-compose-backup = restic_compose_backup.cli:main',
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
pytest==4.3.1
|
pytest==9.0.3
|
||||||
tox
|
tox
|
||||||
|
|||||||
Reference in New Issue
Block a user