|
2 years ago | |
---|---|---|
Dockerfile | 2 years ago | |
Makefile | 2 years ago | |
README.md | 2 years ago | |
drone-ssh-keys.sh | 2 years ago |
A Dockerfile for rsync+ssh deploys using Drone.
ssh_private_key
and ssh_host_key
.drone.yml
, run drone-ssh-keys
to inject SSH secrets into ~/.ssh
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'
make image IMAGE_NAME=your_name_here