diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..05db78e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/mydumper"] + path = src/mydumper + url = https://github.com/maxbube/mydumper.git diff --git a/docker-compose.yaml b/docker-compose.yaml index bf59199..928df74 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,7 +4,6 @@ services: build: ./src env_file: - restic_compose_backup.env - - alerts.env labels: restic-compose-backup.volumes: true restic-compose-backup.volumes.include: 'src' diff --git a/src/Dockerfile b/src/Dockerfile index 13023d5..2a0b892 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -11,25 +11,6 @@ ADD https://github.com/itzg/rcon-cli/releases/download/${RCON_CLI_VERSION}/rcon- RUN tar x -f /tmp/rcon-cli.tar.gz -C /opt/ && \ chmod +x /opt/rcon-cli -RUN apk -U --no-cache add \ - build-base \ - build-dependencies \ - gcc \ - wget \ - git \ - curl \ - openssl-dev \ - mariadb-dev \ - makec - -ADD mydumper /usr/src/ -WORKDIR /usr/src - -RUN \ - cmake . && \ - make && \ - make install - FROM restic/restic RUN apk -U --no-cache add \ @@ -41,8 +22,27 @@ RUN apk -U --no-cache add \ mariadb-client \ postgresql-client +RUN apk -U --no-cache add \ + build-base \ + gcc \ + wget \ + git \ + curl \ + openssl-dev \ + mariadb-dev \ + cmake \ + glib-dev \ + zlib-dev \ + pcre-dev + +ADD mydumper /usr/src/ +WORKDIR /usr/src + +RUN cmake . && \ + make && \ + make install + COPY --from=builder /opt/rcon-cli /opt/rcon-cli -COPY --from=builder /usr/bin/mydumper /usr/bin/mydumper RUN ln -s /opt/rcon-cli /usr/bin @@ -51,7 +51,7 @@ RUN ln -s /opt/rcon-cli /usr/bin ADD . /restic-compose-backup WORKDIR /restic-compose-backup -RUN pip3 install -U pip setuptools wheel && pip3 install -e . +RUN pip install -U pip setuptools wheel && pip install -e . ENV XDG_CACHE_HOME=/cache # end install diff --git a/src/mydumper b/src/mydumper new file mode 160000 index 0000000..1fabdf8 --- /dev/null +++ b/src/mydumper @@ -0,0 +1 @@ +Subproject commit 1fabdf87e3007e5934227b504ad673ba3697946c diff --git a/src/restic_compose_backup/containers_db.py b/src/restic_compose_backup/containers_db.py index 141fc7f..008853e 100644 --- a/src/restic_compose_backup/containers_db.py +++ b/src/restic_compose_backup/containers_db.py @@ -131,7 +131,6 @@ class MysqlContainer(Container): destination /= project_name destination /= self.service_name - destination /= "all_databases.sql" return destination