mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2025-01-18 16:22:33 +01:00
added docker-compose file for testing and bump base image
This commit is contained in:
parent
7f01602f0f
commit
592e617005
2 changed files with 34 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:3.7
|
FROM alpine:3.10
|
||||||
LABEL maintainer "Fco. Javier Delgado del Hoyo <frandelhoyo@gmail.com>"
|
LABEL maintainer "Fco. Javier Delgado del Hoyo <frandelhoyo@gmail.com>"
|
||||||
|
|
||||||
RUN apk add --update bash mysql-client gzip openssl && rm -rf /var/cache/apk/*
|
RUN apk add --update bash mysql-client gzip openssl && rm -rf /var/cache/apk/*
|
||||||
|
|
33
docker-compose.yaml
Normal file
33
docker-compose.yaml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
version: "2"
|
||||||
|
services:
|
||||||
|
mariadb:
|
||||||
|
image: mariadb:10
|
||||||
|
container_name: my_mariadb
|
||||||
|
expose:
|
||||||
|
- 3306
|
||||||
|
volumes:
|
||||||
|
- data:/var/lib/mysql
|
||||||
|
- ${VOLUME_PATH}/backup:/backup
|
||||||
|
environment:
|
||||||
|
- MYSQL_DATABASE=${DATABASE_NAME}
|
||||||
|
- MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
backup:
|
||||||
|
build: .
|
||||||
|
image: fradelg/mysql-cron-backup
|
||||||
|
depends_on:
|
||||||
|
- mariadb
|
||||||
|
volumes:
|
||||||
|
- ${VOLUME_PATH}/backup:/backup
|
||||||
|
environment:
|
||||||
|
- MYSQL_HOST=my_mariadb
|
||||||
|
- MYSQL_USER=root
|
||||||
|
- MYSQL_PASS=${MARIADB_ROOT_PASSWORD}
|
||||||
|
- MAX_BACKUPS=1
|
||||||
|
- INIT_BACKUP=1
|
||||||
|
- CRON_TIME=0 0 * * *
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
data:
|
Loading…
Reference in a new issue