Adding diun, mariadb and redis snippets, update ToDo list in README.md
This commit is contained in:
parent
6120c7e0e4
commit
85a715a1f2
4 changed files with 105 additions and 1 deletions
|
@ -2,6 +2,15 @@
|
|||
|
||||
In this repository I collect docker compose snippets that represent default solutions for containers within a stack file.
|
||||
|
||||
## ToDo:
|
||||
|
||||
These are things that need to be fixed up:
|
||||
- mariadb.yml: Add a few comments to make clear what can and should be changed according to neccessity.
|
||||
- mariadb.yml: Add an example for clustering settings as well.
|
||||
- naruadb.yml: Let healthcheck do more than just a ping.
|
||||
- redis.yml: Add switches for more common use cases like multiple databases or clustering.
|
||||
- diun.yml: Try to figure out how to configure the content of the setting files within the stack file to get rid of the bind mount.
|
||||
|
||||
## License
|
||||
![Creative Commons Attribution 4.0 International License](https://i.creativecommons.org/l/by/4.0/88x31.png)
|
||||
|
||||
|
|
27
diun.yml
Normal file
27
diun.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
version: "3.5"
|
||||
|
||||
volumes:
|
||||
data:
|
||||
|
||||
services:
|
||||
diun:
|
||||
image: "ghcr.io/crazy-max/diun:latest"
|
||||
container_name: diun
|
||||
command: serve
|
||||
volumes:
|
||||
- data:/data
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /etc/docker-configs/diun/diun.yaml:/etc/diun/diun.yaml
|
||||
environment:
|
||||
- "TZ=Europe/Berlin"
|
||||
- "LOG_LEVEL=info"
|
||||
- "LOG_JSON=false"
|
||||
- "DIUN_WATCH_WORKERS=20"
|
||||
- "DIUN_WATCH_SCHEDULE=0 0 09 * * *"
|
||||
- "DIUN_WATCH_JITTER=30s"
|
||||
- "DIUN_PROVIDERS_DOCKER=true"
|
||||
labels:
|
||||
- "diun.enable=true"
|
||||
restart: unless-stopped
|
||||
...
|
53
mariadb.yml
Normal file
53
mariadb.yml
Normal file
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
version: "3"
|
||||
|
||||
volumes:
|
||||
db:
|
||||
dbbackup:
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:latest
|
||||
restart: unless-stopped
|
||||
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=${PW_MYSQLROOT}
|
||||
- MYSQL_PASSWORD=${PW_MYSQL}
|
||||
- MYSQL_DATABASE=${DB_DATABASE}
|
||||
- MYSQL_USER=${DB_USER}
|
||||
- MARIADB_AUTO_UPGRADE=1
|
||||
- MARIADB_DISABLE_UPGRADE_BACKUP=1
|
||||
healthcheck:
|
||||
test: ['CMD', 'mariadb-admin', 'ping', '-h', 'localhost']
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
labels:
|
||||
diun.enable: true
|
||||
|
||||
db-backup:
|
||||
image: fradelg/mysql-cron-backup:latest
|
||||
depends_on:
|
||||
- db
|
||||
links:
|
||||
- db
|
||||
volumes:
|
||||
- dbbackup:/backup
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- MYSQL_HOST=db
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=${PW_MYSQLROOT}
|
||||
- MYSQLDUMP_OPTS=--force --single-transaction --quick --compact --extended-insert --order-by-primary
|
||||
- MAX_BACKUPS=4
|
||||
- INIT_BACKUP=1
|
||||
# Every day at 00:30
|
||||
- CRON_TIME=30 0 * * *
|
||||
# Make it small
|
||||
- GZIP_LEVEL=9
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
diun.enable: true
|
||||
|
||||
...
|
15
redis.yml
Normal file
15
redis.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
version: "3"
|
||||
|
||||
volumes:
|
||||
redis:
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:alpine
|
||||
volumes:
|
||||
- redis:/data
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
diun.enable: true
|
||||
...
|
Loading…
Reference in a new issue