mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 10:18:39 +00:00
Fix backups for MariaDB and Postgres
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -2,6 +2,8 @@
|
||||
|
||||
build:
|
||||
make -C packages/apps/http-cache image
|
||||
make -C packages/apps/postgres image
|
||||
make -C packages/apps/mysql image
|
||||
make -C packages/apps/clickhouse image
|
||||
make -C packages/apps/kubernetes image
|
||||
make -C packages/system/cilium image
|
||||
|
||||
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.5.0
|
||||
version: 0.5.1
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
MARIADB_BACKUP_TAG = $(shell awk '$$1 == "version:" {print $$2}' Chart.yaml)
|
||||
|
||||
include ../../../scripts/common-envs.mk
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
|
||||
image:
|
||||
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/mariadb-backup \
|
||||
--provenance false \
|
||||
--tag $(REGISTRY)/mariadb-backup:$(call settag,$(MARIADB_BACKUP_TAG)) \
|
||||
--cache-from type=registry,ref=$(REGISTRY)/mariadb-backup:latest \
|
||||
--cache-to type=inline \
|
||||
--metadata-file images/mariadb-backup.json \
|
||||
--push=$(PUSH) \
|
||||
--load=$(LOAD)
|
||||
echo "$(REGISTRY)/mariadb-backup:$(call settag,$(MARIADB_BACKUP_TAG))@$$(yq e '."containerimage.digest"' images/mariadb-backup.json -o json -r)" \
|
||||
> images/mariadb-backup.tag
|
||||
rm -f images/mariadb-backup.json
|
||||
|
||||
1
packages/apps/mysql/images/mariadb-backup.tag
Normal file
1
packages/apps/mysql/images/mariadb-backup.tag
Normal file
@@ -0,0 +1 @@
|
||||
ghcr.io/aenix-io/cozystack/mariadb-backup:latest@sha256:793edb25a29cbc00781e40af883815ca36937e736e2b0d202ea9c9619fb6ca11
|
||||
2
packages/apps/mysql/images/mariadb-backup/Dockerfile
Normal file
2
packages/apps/mysql/images/mariadb-backup/Dockerfile
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM alpine:3.20
|
||||
RUN apk add --no-cache mariadb-client uuidgen restic
|
||||
@@ -27,7 +27,7 @@ spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: mysqldump
|
||||
image: "{{ index $image "image.name" }}@{{ index $image "containerimage.digest" }}"
|
||||
image: "{{ $.Files.Get "images/mariadb-backup.tag" | trim }}"
|
||||
command:
|
||||
- /bin/sh
|
||||
- /scripts/backup.sh
|
||||
|
||||
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.6.0
|
||||
version: 0.6.1
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
POSTGRES_BACKUP_TAG = $(shell awk '$$1 == "version:" {print $$2}' Chart.yaml)
|
||||
|
||||
include ../../../scripts/common-envs.mk
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
|
||||
image:
|
||||
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/postgres-backup \
|
||||
--provenance false \
|
||||
--tag $(REGISTRY)/postgres-backup:$(call settag,$(POSTGRES_BACKUP_TAG)) \
|
||||
--cache-from type=registry,ref=$(REGISTRY)/postgres-backup:latest \
|
||||
--cache-to type=inline \
|
||||
--metadata-file images/postgres-backup.json \
|
||||
--push=$(PUSH) \
|
||||
--load=$(LOAD)
|
||||
echo "$(REGISTRY)/postgres-backup:$(call settag,$(POSTGRES_BACKUP_TAG))@$$(yq e '."containerimage.digest"' images/postgres-backup.json -o json -r)" \
|
||||
> images/postgres-backup.tag
|
||||
rm -f images/postgres-backup.json
|
||||
|
||||
1
packages/apps/postgres/images/postgres-backup.tag
Normal file
1
packages/apps/postgres/images/postgres-backup.tag
Normal file
@@ -0,0 +1 @@
|
||||
ghcr.io/aenix-io/cozystack/postgres-backup:latest@sha256:d2015c6dba92293bda652d055e97d1be80e8414c2dc78037c12812d1a2e2cba1
|
||||
2
packages/apps/postgres/images/postgres-backup/Dockerfile
Normal file
2
packages/apps/postgres/images/postgres-backup/Dockerfile
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM alpine:3.20
|
||||
RUN apk add --no-cache postgresql16-client uuidgen restic
|
||||
@@ -27,7 +27,7 @@ spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: mysqldump
|
||||
image: "{{ index $image "image.name" }}@{{ index $image "containerimage.digest" }}"
|
||||
image: "{{ $.Files.Get "images/postgres-backup.tag" | trim }}"
|
||||
command:
|
||||
- /bin/sh
|
||||
- /scripts/backup.sh
|
||||
|
||||
Reference in New Issue
Block a user