couchdb-bootstrap
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -11,3 +11,3 @@ #!/usr/bin/env node | ||
var url = args[0]; | ||
var source = args[1] || process.cwd(); | ||
var source = args[1] || process.cwd() | ||
@@ -14,0 +14,0 @@ bootstrap(url, source, function(error, response) { |
@@ -53,3 +53,3 @@ var glob = require('glob') | ||
return function(error, results) { | ||
if (error) return done(error) | ||
if (error) return callback(error) | ||
@@ -56,0 +56,0 @@ var result = {} |
{ | ||
"name": "couchdb-bootstrap", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Bootstrap projects: configure CouchDB, setup security, deploy ddocs and create users.", | ||
@@ -33,7 +33,7 @@ "main": "index.js", | ||
"async": "^1.0.0", | ||
"couchdb-configure": "^1.0.0", | ||
"couchdb-configure": "^1.1.0", | ||
"couchdb-push": "^1.3.2", | ||
"couchdb-secure": "^1.1.0", | ||
"couchdb-secure": "^1.2.0", | ||
"glob": "^5.0.10" | ||
} | ||
} |
# CouchDB Bootstrap | ||
Bootstrap CouchDB database: | ||
Bootstrap CouchDB server from CLI or API. | ||
- [x] Configure CouchDB | ||
- [x] Create Databases unless they exist | ||
- [x] Setup `_security` Settings | ||
- [x] Deploy (Design) Documents, Replications and Users | ||
[![Build | ||
@@ -13,21 +8,57 @@ Status](https://travis-ci.org/eHealthAfrica/couchdb-bootstrap.svg?branch=master)](https://travis-ci.org/eHealthAfrica/couchdb-bootstrap) | ||
* Configure CouchDB | ||
* Create users | ||
* Create databases (unless they exist) | ||
* Setup database \_security object | ||
* Deploy design documents | ||
* Initiate replications | ||
* Seed documents | ||
CouchDB Bootstrap combines different small tools, which can also be used | ||
independently. Each of those tools come has a similar API and is shipped with a | ||
CLI: | ||
* [couchdb-compile](https://github.com/jo/couchdb-compile) - Handle sources: fs mapping / JSON / CommonJS | ||
* [couchdb-configure](https://github.com/eHealthAfrica/couchdb-configure) - Configure CouchDB | ||
* [couchdb-ensure](https://github.com/eHealthAfrica/couchdb-ensure) - Create database unless exists | ||
* [couchdb-push](https://github.com/jo/couchdb-push) - Push documens: users, replications, design docs and normal documents | ||
* [couchdb-secure](https://github.com/eHealthAfrica/couchdb-secure) - Secure databases: write security object | ||
## Directory | ||
Think about CouchDB Bootstrap as a toplevel manager, which reads a directory of | ||
databases and optional `_config` and hands each file over to the appropriate tool: | ||
``` | ||
/path/to/my/project/couchdb | ||
project/couchdb | ||
├── _config.json | ||
├── _replicator | ||
│ ├── setup-alice.json | ||
│ └── setup-bob.json | ||
├── _users | ||
│ ├── alice.json | ||
│ └── bob.json | ||
├── alicedb | ||
├── myapp | ||
│ ├── _design | ||
│ │ └── myapp.js | ||
│ ├── _security.json | ||
│ └── adoc.json | ||
├── myapp-alice | ||
│ └── _security.json | ||
└── bobdb | ||
├── _design | ||
│ └── myapp.js | ||
├── _security.json | ||
└── adoc.json | ||
└── myapp-bob | ||
└── _security.json | ||
``` | ||
In the directory tree above `project/couchdb/_config.json` is handed to | ||
[couchdb-configure](https://github.com/eHealthAfrica/couchdb-configure), | ||
`project/couchdb/_replicator/setup-alice.json`, | ||
`project/couchdb/myapp/_design/myapp.js` | ||
`project/couchdb/myapp/adoc.json` are handed (beside others) to | ||
[couchdb-push](https://github.com/jo/couchdb-push) | ||
and `project/couchdb/myapp-alice/_security.json` to | ||
[couchdb-secure](https://github.com/eHealthAfrica/couchdb-secure). | ||
See [couchdb-compile](https://github.com/jo/couchdb-compile) for more details | ||
about the CouchDB Filesystem Mapping. | ||
about the CouchDB Filesystem Mapping on a document / security object / config | ||
level. | ||
@@ -61,3 +92,3 @@ ## API | ||
When `SOURCE` is omitted the current directory will be used. | ||
When `SOURCE` is omitted, the current directory will be used. | ||
@@ -64,0 +95,0 @@ ### Example |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13208
25
302
103
Updatedcouchdb-configure@^1.1.0
Updatedcouchdb-secure@^1.2.0