summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DEPLOY.md25
-rw-r--r--DEVELOP.md2
2 files changed, 24 insertions, 3 deletions
diff --git a/DEPLOY.md b/DEPLOY.md
index f61301c..23a54a4 100644
--- a/DEPLOY.md
+++ b/DEPLOY.md
@@ -31,12 +31,33 @@ Please make sure your deploy includes the following files:
## Couch Security ##
We recommend against using an admin user for running the webapp. To avoid this couch design documents need to be created ahead of time and the auto update mechanism needs to be disabled.
-Take a look at test/setup_couch.sh for an example of securing the couch. After securing the couch migrations need to be run with admin permissions. The before_script block in .travis.yml illustrates how to do this:
+Take a look at test/setup_couch.sh for an example of securing the couch.
-```
+### DESIGN DOCUMENTS ###
+
+After securing the couch design documents need to be deployed with admin permissions. There are two ways of doing this:
+ * rake couchrest:migrate_with_proxies
+ * dump the documents as files with `rake couchrest:dump` and deploy them
+ to the couch by hand or with puppet.
+
+#### CouchRest::Migrate ####
+
+The before_script block in .travis.yml illustrates how to do this:
+
+```bash
mv test/config/couchdb.yml.admin config/couchdb.yml # use admin privileges
bundle exec rake couchrest:migrate_with_proxies # run the migrations
bundle exec rake couchrest:migrate_with_proxies # looks like this needs to run twice
mv test/config/couchdb.yml.user config/couchdb.yml # drop admin privileges
```
+#### Deploy design docs from CouchRest::Dump ####
+
+First of all we get the design docs as files:
+
+```bash
+# put design docs in /tmp/design
+bundle exec rake couchrest:dump
+```
+
+Then we add them to files/design in the site_couchdb module in leap_platform so they get deployed with the couch. You could also upload them using curl or sth. similar.
diff --git a/DEVELOP.md b/DEVELOP.md
index 3603dc5..6aeccff 100644
--- a/DEVELOP.md
+++ b/DEVELOP.md
@@ -95,4 +95,4 @@ For example:
test "robot" do
login_as @user
visit robot_path(@robot, :locale => nil)
- end \ No newline at end of file
+ end