Skip to content

Commit 0067f55

Browse files
committed
Move mysql example to mysql folder
1 parent 7bda69b commit 0067f55

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

examples/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# Example container mounted folders
4+
**/backups/
5+
**/db/
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
version: '2'
22

3+
networks:
4+
example-db-network:
5+
name: example-db-network
6+
37
services:
48
example-db:
9+
hostname: example-db-host
510
container_name: example-db
611
image: mariadb:latest
12+
ports:
13+
- 13306:3306
714
volumes:
815
- ./db:/var/lib/mysql
916
environment:
@@ -12,6 +19,8 @@ services:
1219
- MYSQL_USER=example
1320
- MYSQL_PASSWORD=examplepassword
1421
restart: always
22+
networks:
23+
- example-db-network
1524

1625
example-db-backup:
1726
container_name: example-db-backup
@@ -22,17 +31,21 @@ services:
2231
- ./backups:/backup
2332
#- ./post-script.sh:/assets/custom-scripts/post-script.sh
2433
environment:
34+
# - DEBUG_MODE=TRUE
2535
- DB_TYPE=mariadb
26-
- DB_HOST=example-db
36+
- DB_HOST=example-db-host
2737
- DB_NAME=example
2838
- DB_USER=example
29-
- DB_PASS="examplepassword"
30-
- DB_DUMP_FREQ=1440
31-
- DB_DUMP_BEGIN=0000
32-
- DB_CLEANUP_TIME=8640
39+
- DB_PASS=examplepassword
40+
- DB_DUMP_FREQ=1 # backup every minute
41+
# - DB_DUMP_BEGIN=0000 # backup starts immediately
42+
- DB_CLEANUP_TIME=5 # clean backups they are older than 5 minute
3343
- CHECKSUM=SHA1
34-
- COMPRESSION=ZSTD
44+
- COMPRESSION=GZ
3545
- SPLIT_DB=FALSE
46+
- CONTAINER_ENABLE_MONITORING=FALSE
3647
restart: always
48+
networks:
49+
- example-db-network
3750

3851

0 commit comments

Comments
 (0)