mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2025-01-19 08:42:34 +01:00
Compare commits
No commits in common. "8a403d725b59bcd48796b79e468a35d49b1b445e" and "da8028abe537c10993f7bb3d602797c25a93beb3" have entirely different histories.
8a403d725b
...
da8028abe5
3 changed files with 9 additions and 15 deletions
10
.github/workflows/image.yml
vendored
10
.github/workflows/image.yml
vendored
|
@ -22,10 +22,10 @@ jobs:
|
|||
DATABASE_NAME: foo
|
||||
MARIADB_ROOT_PASSWORD: abcd
|
||||
run: |
|
||||
docker compose up -d mariadb
|
||||
docker compose run backup /backup.sh
|
||||
docker compose run backup /restore.sh /backup/latest.foo.sql.gz
|
||||
docker compose stop
|
||||
docker-compose up -d mariadb
|
||||
docker-compose run backup /backup.sh
|
||||
docker-compose run backup /restore.sh /backup/latest.foo.sql.gz
|
||||
docker-compose stop
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: test
|
||||
|
@ -44,7 +44,7 @@ jobs:
|
|||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: fradelg
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build multiarch image
|
||||
run: |
|
||||
|
|
|
@ -12,7 +12,7 @@ ENV GO111MODULE=on
|
|||
RUN go mod tidy
|
||||
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -o /go/bin/dockerize .
|
||||
|
||||
FROM alpine:3.20.3
|
||||
FROM alpine:3.20.2
|
||||
LABEL maintainer "Fco. Javier Delgado del Hoyo <frandelhoyo@gmail.com>"
|
||||
|
||||
RUN apk add --update \
|
||||
|
|
|
@ -11,19 +11,13 @@ services:
|
|||
environment:
|
||||
- MYSQL_DATABASE=${DATABASE_NAME}
|
||||
- MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
|
||||
- MYSQL_ALLOW_EMPTY_ROOT_PASSWORD=yes
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--su-mysql", "--connect"]
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
backup:
|
||||
build: .
|
||||
image: fradelg/mysql-cron-backup
|
||||
depends_on:
|
||||
mariadb:
|
||||
condition: service_healthy
|
||||
- mariadb
|
||||
volumes:
|
||||
- ${VOLUME_PATH}/backup:/backup
|
||||
environment:
|
||||
|
|
Loading…
Reference in a new issue