traefik负载均衡/滚动升级
docker-compose.yml version : '3' services: reverse-proxy: # The official v2 Traefik docker image image: traefik:v2.10 # Enables the web UI and tells Traefik to listen to docker command: # insecure - --api.insecure=true - --providers.docker # Create an entrypoint "http" listening on port 80 - --entrypoints.http.address=:80 # Create an entrypoint "https" listening on port 443 - --entrypoints.https.add...
定时备份docker中的mysql
docker exec mysql /bin/bash -c 'mysqldump -uroot -pPASSWORD --databases confluence ' >/mnt/home/brucehe/confluence/backup/confluence_`date +%F`.sql; gzip /mnt/home/brucehe/confluence/backup/confluence_`date +%F`.sql; crontab表达试: sudo crontab -e 0 1 * * * backupmysql.sh #每天晚上1点执行 注意:一定要删除命令(docker exec -it)中的 -it, 因为-it会开启新的终端,而cron表达试及service等不支持交互试的命令执行。