Move mysql example to mysql folder

This commit is contained in:
Elias Oehen
2022-10-04 18:21:21 +02:00
parent 7bda69b062
commit 0067f552f1
3 changed files with 24 additions and 6 deletions

5
examples/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# Example container mounted folders
**/backups/
**/db/

View File

@@ -1,9 +1,16 @@
version: '2' version: '2'
networks:
example-db-network:
name: example-db-network
services: services:
example-db: example-db:
hostname: example-db-host
container_name: example-db container_name: example-db
image: mariadb:latest image: mariadb:latest
ports:
- 13306:3306
volumes: volumes:
- ./db:/var/lib/mysql - ./db:/var/lib/mysql
environment: environment:
@@ -12,6 +19,8 @@ services:
- MYSQL_USER=example - MYSQL_USER=example
- MYSQL_PASSWORD=examplepassword - MYSQL_PASSWORD=examplepassword
restart: always restart: always
networks:
- example-db-network
example-db-backup: example-db-backup:
container_name: example-db-backup container_name: example-db-backup
@@ -22,17 +31,21 @@ services:
- ./backups:/backup - ./backups:/backup
#- ./post-script.sh:/assets/custom-scripts/post-script.sh #- ./post-script.sh:/assets/custom-scripts/post-script.sh
environment: environment:
# - DEBUG_MODE=TRUE
- DB_TYPE=mariadb - DB_TYPE=mariadb
- DB_HOST=example-db - DB_HOST=example-db-host
- DB_NAME=example - DB_NAME=example
- DB_USER=example - DB_USER=example
- DB_PASS="examplepassword" - DB_PASS=examplepassword
- DB_DUMP_FREQ=1440 - DB_DUMP_FREQ=1 # backup every minute
- DB_DUMP_BEGIN=0000 # - DB_DUMP_BEGIN=0000 # backup starts immediately
- DB_CLEANUP_TIME=8640 - DB_CLEANUP_TIME=5 # clean backups they are older than 5 minute
- CHECKSUM=SHA1 - CHECKSUM=SHA1
- COMPRESSION=ZSTD - COMPRESSION=GZ
- SPLIT_DB=FALSE - SPLIT_DB=FALSE
- CONTAINER_ENABLE_MONITORING=FALSE
restart: always restart: always
networks:
- example-db-network

View File