aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--installing/deploy.md54
1 files changed, 35 insertions, 19 deletions
diff --git a/installing/deploy.md b/installing/deploy.md
index 49e960a32..63be3c96d 100644
--- a/installing/deploy.md
+++ b/installing/deploy.md
@@ -37,41 +37,57 @@ Capistrano is included as part of Alaveteli as a standard deployment system.
### Set up
-First you need to customise your deployment settings, for example the name of the
-server you're deploying to. Copy the example file `config/deploy.yml.example` to
-`config/deploy.yml` and edit the settings to
-suit you.
+Capistrano requires things to be set up at both ends -- that is, on the server
+where you want Alaveteli to run, and on your own local machine.
-These are the general steps required to set up the deployment mechanism. Capistrano
-requires things to be set up at both ends -- that is, on the server where you want
-Alaveteli to run, and on your own machine (and on the machines of anyone in your team
-who you want to be able to deploy):
+* your *local machine* may be your laptop or similar device -- as well as those
+ belonging to anyone in your team whom you want to be able to deploy
+* *the server* is the machine (possibly on that will be running the Alaveteli instance you're deploying
+
+First you need to customise the deployment settings on your own machine. Copy
+the example file `config/deploy.yml.example` to `config/deploy.yml` and edit
+the settings to suit -- for example, the name of the server.
+
+These are the general steps required to set up the deployment mechanism:
+
+On your local machine:
* Install packages from `config/packages`
* Install Postgres and configure a user
* Create a directory to deploy to and make sure your deployment user can write to it
* Run `cap deploy:setup` to create directories, etc.
-* Run `cap deploy:update_code` so that we've got a copy of the example config on the server. This process will take a long time installing gems, etc. it will also fail on `rake:themes:install` but that's OK
-* SSH to the server, change to the `deploy_to` directory
+* Run `cap deploy:update_code` so that there's a copy of the example config on the server.
+ This process will take a long time installing gems and suchlike.
+ It will also fail on `rake:themes:install` -- but that's OK
+
+Next, on the server:
+
+> *Note:* if you've *already* installed Alaveteli, these files may already be in place.
+> Otherwise, you should [install Alaveteli]({{ site.baseurl }}installing/) first.
+
+* change to the `deploy_to` directory
* `cp releases/[SOME_DATE]/config/general.yml-example shared/general.yml`
* `cp releases/[SOME_DATE]/config/database.yml-example shared/database.yml`
* Edit those files to match your required settings
-* Back on your machine run `cap deploy` and it should successfully deploy
-* Run the DB migrations `cap deploy:migrate`
-* Build the Xapian DB `cap xapian:rebuild_index`
-* Configure Apache/Passenger with a DocumentRoot of `your_deploy_to/current/public`
+
+Then, back on your local machine:
+
+* Back on your machine, run `cap deploy` and it should successfully deploy
+* Do the DB migrations: run `cap deploy:migrate`
+* Build the Xapian database: run `cap xapian:rebuild_index`
+* Configure Apache/Passenger with a `DocumentRoot` of `your_deploy_to/current/public`
* Phew. Time to admire your work by browsing to the server!
### Usage
Ensure you've got a `config/deploy.yml` file with the correct settings for your
-site. You'll need to share this with everyone in your team that deploys so it
-might be a good idea to keep the latest version in a
-[Gist](http://gist.github.com/).
+site. If there are other people in your team who need to deploy, you'll need to
+share it with them too -- it might be a good idea to keep the latest
+version in a [Gist](http://gist.github.com/).
-To deploy to staging just run `cap deploy` but if you want to deploy to
-production you need to run `cap -S stage=production deploy`.
+* to deploy to staging, just run `cap deploy`
+* to deploy to production, run `cap -S stage=production deploy`
For additional usage instructions, see the [Capistrano
wiki](https://github.com/capistrano/capistrano/wiki/).