This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Fully backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases. | |
| project_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" | |
| cd "$project_dir" | |
| project_name=$(basename "$project_dir") | |
| backup_time=$(date +"%Y-%m-%d_%H-%M") | |
| backup_dir="$project_dir/data/backups/$backup_time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Promise = require('bluebird'), | |
| mysql = require('mysql'), | |
| using = Promise.using; | |
| Promise.promisifyAll(require("mysql/lib/Connection").prototype); | |
| Promise.promisifyAll(require("mysql/lib/Pool").prototype); | |
| var env = (process.env.NODE_ENV == 'production') ? 'prod': 'dev'; | |
| var pools = {}; | |
| var base = { |