From cdbb850afc3c8ee3721af93fcb9a3563ae89f120 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 22 Sep 2020 15:12:27 +0200 Subject: [PATCH] Add deploy command and multi-name compose file --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 333be5a..ba13691 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ If you push a commit to master, the [Drone config](./.drone.yml) will publish to ## Usage -### compose.yml +`docker stack deploy -c compose.yml -c compose.backup.yml mycoolapp` + +### compose.backup.yml ```yaml backupbot: @@ -49,11 +51,11 @@ location: source_directories: - /var/www/html/wp-content repositories: - - {{ env "BORGBASE_REPO" }} + - { { env "BORGBASE_REPO" } } storage: compression: auto,zstd - encryption_passphrase: {{ secret "backup_bot_password" }} + encryption_passphrase: { { secret "backup_bot_password" } } archive_name_format: "{hostname}-{now}" ssh_command: "ssh -o 'StrictHostKeyChecking no' -i /run/secrets/backup_bot_ssh_key" @@ -76,9 +78,9 @@ hooks: after_backup: - echo "`date` - Finished backup" mysql_databases: - - name: {{ env "DB_TABLE" }} - hostname: {{ env "DB_HOST" }} + - name: { { env "DB_TABLE" } } + hostname: { { env "DB_HOST" } } port: 3306 - username: {{ env "DB_USER" }} - password: {{ secret "db_password" }} + username: { { env "DB_USER" } } + password: { { secret "db_password" } } ```