This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Settings up deployments
Koen edited this page Aug 1, 2019
·
3 revisions
For deployments we use Capistrano, which is exposed on the CLI by the cap
command.
You'll need to set a few thing before we can do the first time server setup:
In config/deploy.rb
:
- Set the
application
name (in kebab-casing) - Set the
repo_url
In config/deploy/<environment>.rb
:
- Set the
server
hostname or IP address - Set the SSH
user
- Set the
deploy_to
directory
Initial server setup can be done via:
$ cap <environment> deploy:setup
This will create a few directories, install Composer and WP-CLI, and copy some files which need to be persistent between deploys (eg. files in de shared
folder and an initial .env
file).
Capistrano is not always clear on what the issue is and where it comes from. Some common pitfalls:
- Make sure your SSH key is forwarded
- Make sure your SSH key is added to your shell. Add this to your
.bash_profile
(or alternative) will ensure it is loaded every time:ssh-add ~/.ssh/id_rsa > /dev/null 2>&1
- Make sure the branch or tag you're trying to deploy exist
See also:
- Prerequisites with instructions for Ruby and Bundler