Add deploy command and multi-name compose file
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luke Murphy 2020-09-22 15:12:27 +02:00
parent 725558b1db
commit cdbb850afc
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 9 additions and 7 deletions

View File

@ -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" } }
```