1
0
Bifurcation 0
A Docker image for rsync+ssh deploys using Drone.
Aller au fichier
Annika Backstrom 5d66058f13 Initial commit 2018-06-07 14:44:53 +00:00
Dockerfile Initial commit 2018-06-07 14:44:53 +00:00
Makefile Initial commit 2018-06-07 14:44:53 +00:00
README.md Initial commit 2018-06-07 14:44:53 +00:00
drone-ssh-keys.sh Initial commit 2018-06-07 14:44:53 +00:00

README.md

drone-rsync-ssh

A Dockerfile for rsync+ssh deploys using Drone.

  • In Drone, add repository secrets for ssh_private_key and ssh_host_key
  • In your .drone.yml, run drone-ssh-keys to inject SSH secrets into ~/.ssh

Sample .drone.yml

Here's a sample .drone.yml that injects the SSH keys, rsyncs files to a host, then triggers a command on the host.

pipeline:
  deploy:
    image: images.abackstrom.com/rsync-ssh
    secrets: [ ssh_private_key, ssh_host_key ]
    commands:
      - drone-ssh-keys
      - rsync -Chrz -e ssh ./public user@host:/var/www/html
      - ssh user@host 'sudo systemctl reload nginx'

Building the image

make image IMAGE_NAME=your_name_here