Compare commits
4 Commits
d20d5756aa
...
3be7737232
Author | SHA1 | Date |
---|---|---|
Jannik | 3be7737232 | |
einarf | 405bd4af15 | |
dreadper | 28dda6b09d | |
dreadper | b400138b73 |
|
@ -4,7 +4,7 @@ services:
|
||||||
build: ./src
|
build: ./src
|
||||||
env_file:
|
env_file:
|
||||||
- restic_compose_backup.env
|
- restic_compose_backup.env
|
||||||
- alerts.env
|
# - alerts.env
|
||||||
labels:
|
labels:
|
||||||
restic-compose-backup.volumes: true
|
restic-compose-backup.volumes: true
|
||||||
restic-compose-backup.volumes.include: 'src'
|
restic-compose-backup.volumes.include: 'src'
|
||||||
|
@ -32,7 +32,7 @@ services:
|
||||||
- SOME_VALUE=test
|
- SOME_VALUE=test
|
||||||
- ANOTHER_VALUE=1
|
- ANOTHER_VALUE=1
|
||||||
|
|
||||||
mysql:
|
mysql5:
|
||||||
image: mysql:5
|
image: mysql:5
|
||||||
labels:
|
labels:
|
||||||
restic-compose-backup.mysql: true
|
restic-compose-backup.mysql: true
|
||||||
|
@ -42,7 +42,19 @@ services:
|
||||||
- MYSQL_USER=myuser
|
- MYSQL_USER=myuser
|
||||||
- MYSQL_PASSWORD=mypassword
|
- MYSQL_PASSWORD=mypassword
|
||||||
volumes:
|
volumes:
|
||||||
- mysqldata:/var/lib/mysql
|
- mysqldata5:/var/lib/mysql
|
||||||
|
|
||||||
|
mysql8:
|
||||||
|
image: mysql:8
|
||||||
|
labels:
|
||||||
|
restic-compose-backup.mysql: true
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=my-secret-pw
|
||||||
|
- MYSQL_DATABASE=mydb
|
||||||
|
- MYSQL_USER=myuser
|
||||||
|
- MYSQL_PASSWORD=mypassword
|
||||||
|
volumes:
|
||||||
|
- mysqldata8:/var/lib/mysql
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
image: mariadb:10
|
image: mariadb:10
|
||||||
|
@ -68,7 +80,8 @@ services:
|
||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysqldata:
|
mysqldata5:
|
||||||
|
mysqldata8:
|
||||||
mariadbdata:
|
mariadbdata:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
FROM restic/restic:0.9.6
|
FROM restic/restic:0.9.6
|
||||||
|
|
||||||
RUN apk update && apk add python3 dcron mariadb-client postgresql-client
|
RUN apk update && apk add python3 \
|
||||||
|
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
|
||||||
|
|
|
@ -40,6 +40,7 @@ class MariadbContainer(Container):
|
||||||
"mysqldump",
|
"mysqldump",
|
||||||
f"--user={creds['username']}",
|
f"--user={creds['username']}",
|
||||||
"--all-databases",
|
"--all-databases",
|
||||||
|
"--no-tablespaces",
|
||||||
]
|
]
|
||||||
|
|
||||||
def backup(self):
|
def backup(self):
|
||||||
|
@ -101,6 +102,7 @@ class MysqlContainer(Container):
|
||||||
"mysqldump",
|
"mysqldump",
|
||||||
f"--user={creds['username']}",
|
f"--user={creds['username']}",
|
||||||
"--all-databases",
|
"--all-databases",
|
||||||
|
"--no-tablespaces",
|
||||||
]
|
]
|
||||||
|
|
||||||
def backup(self):
|
def backup(self):
|
||||||
|
|
|
@ -3,12 +3,15 @@ from setuptools import setup, find_namespace_packages
|
||||||
setup(
|
setup(
|
||||||
name="restic-compose-backup",
|
name="restic-compose-backup",
|
||||||
url="https://github.com/ZettaIO/restic-compose-backup",
|
url="https://github.com/ZettaIO/restic-compose-backup",
|
||||||
version="0.6.0",
|
version="0.7.0",
|
||||||
author="Einar Forselv",
|
author="Einar Forselv",
|
||||||
author_email="eforselv@gmail.com",
|
author_email="eforselv@gmail.com",
|
||||||
packages=find_namespace_packages(include=['restic_compose_backup']),
|
packages=find_namespace_packages(include=[
|
||||||
|
'restic_compose_backup',
|
||||||
|
'restic_compose_backup.*',
|
||||||
|
]),
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'docker==4.1.*',
|
'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',
|
||||||
|
|
Loading…
Reference in New Issue