mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2025-12-06 21:49:40 +01:00
Add deployment example
This commit is contained in:
21
example/docker-compose.yaml
Normal file
21
example/docker-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
mysql-bkup:
|
||||||
|
image: jkaninda/mysql-bkup
|
||||||
|
container_name: mysql-bkup
|
||||||
|
privileged: true
|
||||||
|
devices:
|
||||||
|
- "/dev/fuse"
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- bkup --operation backup --storage s3 --path /mys3_custome_path --dbname database_name --mode scheduled --period "0 1 * * *"
|
||||||
|
environment:
|
||||||
|
- DB_PORT=3306
|
||||||
|
- DB_HOST=mysqlhost
|
||||||
|
- DB_USERNAME=userName
|
||||||
|
- DB_PASSWORD=${DB_PASSWORD}
|
||||||
|
- ACCESS_KEY=${ACCESS_KEY}
|
||||||
|
- SECRET_KEY=${SECRET_KEY}
|
||||||
|
- BUCKETNAME=${BUCKETNAME}
|
||||||
|
- S3_ENDPOINT=https://s3.us-west-2.amazonaws.com
|
||||||
@@ -16,7 +16,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- bkup -o backup -s s3 --path /custom_path
|
- bkup --operation backup --storage s3 --path /custom_path
|
||||||
env:
|
env:
|
||||||
- name: DB_PORT
|
- name: DB_PORT
|
||||||
value: "3306"
|
value: "3306"
|
||||||
Reference in New Issue
Block a user