Compare commits

...

7 commits

Author SHA1 Message Date
Fco. Javier Delgado del Hoyo
8a403d725b
Merge pull request #124 from fradelg/fix/build
Fixed issues in CI testing
2024-09-10 19:54:30 +02:00
Fco. Javier Delgado del Hoyo
dac06953c3
do not mask docker username 2024-09-10 19:52:19 +02:00
Fco. Javier Delgado del Hoyo
a715b4946c
add health check 2024-09-10 19:47:30 +02:00
Fco. Javier Delgado del Hoyo
07213e8135
use service name for dns 2024-09-10 19:37:59 +02:00
Fco. Javier Delgado del Hoyo
353430ff83
move to docker v2 2024-09-10 19:25:10 +02:00
Fco. Javier Delgado del Hoyo
9f3f7bcdfa
Merge pull request #123 from fradelg/dependabot-docker-master-alpine-3.20.3
Bump alpine from 3.20.2 to 3.20.3
2024-09-10 19:15:40 +02:00
dependabot[bot]
23cf857487
Bump alpine from 3.20.2 to 3.20.3
Bumps alpine from 3.20.2 to 3.20.3.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-09 04:30:04 +00:00
3 changed files with 15 additions and 9 deletions

View file

@ -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,10 +44,10 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
username: fradelg
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build multiarch image
run: |
docker buildx build --push \
--tag fradelg/mysql-cron-backup:${{ steps.docker-tag.outputs.tag }} \
--platform linux/amd64,linux/arm/v7,linux/arm64 .
--platform linux/amd64,linux/arm/v7,linux/arm64 .

View file

@ -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.2
FROM alpine:3.20.3
LABEL maintainer "Fco. Javier Delgado del Hoyo <frandelhoyo@gmail.com>"
RUN apk add --update \

View file

@ -11,13 +11,19 @@ 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
mariadb:
condition: service_healthy
volumes:
- ${VOLUME_PATH}/backup:/backup
environment:
@ -30,4 +36,4 @@ services:
restart: unless-stopped
volumes:
data:
data: