drupaldeploy
A Drupal deployment tool using git and ssh
Installation
npm install -g drupaldeploy
Getting started
Init
Creates a config.json and settings.php.
drupaldeploy init
Example config.json:
Setup
Setup the server with your configuration and install git.
drupaldeploy setup
Deploy
Deploy your Drupal project using git pull and ssh.
drupaldeploy deploy
Notice! You need to setup ssh-agent (see below) for this to work, and have permissions to pull from your repository using your own ssh key.
SSH keys with passphrase (or ssh-agent support)
This only tested with Mac/Linux/Windows 10
With the help of ssh-agent
, drupaldeploy
can use SSH keys encrypted with a
passphrase.
Here's the process:
- First remove your
pem
field from theconfig.json
. So, yourconfig.json
only has the username and host only. - Then start a ssh agent with
eval $(ssh-agent)
oreval `ssh-agent.exe`
on Windows 10. - Then add your ssh key with
ssh-add <path-to-key>
, i.e.ssh-add ~/.ssh/id_rsa
. - Then you'll asked to enter the passphrase to the key if you're using one.
- After that simply invoke
drupaldeploy
commands and they'll just work - Once you've deployed your app kill the ssh agent with
ssh-agent -k