Please create a new issue if you encounter any bugs.
This is the server for DiSARM. Users will require access to a configured and deployed client application.
git clone https://gitlab.com/disarm/douma.api douma-api)The client application is served over HTTPS, so any requests made (e.g. to this API) must also be served from a domain using HTTPS. For core instance servers, DiSARM can make a proxy server available.
The domain name needs to be provided to the client application.
It's possible to automatically configure it via a URL parameter, something like https://zwe-mats.api.disarm.io#api_url=https://zwe.api.disarm.io.
This assumes the API server is available through https://zwe.api.disarm.io
npm install
Set SECRET environment variable to any string. It will be used for user API keys generation.
Set MONGODB_URI environment variable to URI of your mongodb installation.
For local installation that could be:
mongodb://localhost/douma
SHEETS_URL environment variable to URI of your users CSV file if you store it remotely.
Alternatively use SHEETS_PATH environment variable to point to CSV file in your local filesystem.npm run start
SECRET=secret MONGODB_URI=mongodb://localhost:27017 SHEETS_PATH=users.csv PORT=3001 npm start
Unzip docs/demo-app-mongodump.zip file and run mongorestore dump/. This will create a database called douma on the localhost MongoDB. Useful for quick setup of a new server without needing config-editor.
You will need to create users.csv file with all your users. Make sure to set either SHEETS_URL or SHEETS_PATH environment variable.
Make a call to the /v4/refresh_users route. You should get a success message back.
The following are required:
id {String} can be anything (e.g. same as username), but must be uniquename {String} - used for displaypassword {String} - no minimum requirementsusername {String} - should be unique, can be the same as _idread - {String} - comma-separated list of applets the user has read permissions for (see below for list)write {String} - comma-separated list of applets the user has write permissions for (see below for list)instance_slug - {String} - provided by maintainers of DOUMA appirs_monitor (dashboard)irs_plan (planning tool)irs_tasker (tasking and team assignment)irs_record_point (data collection)debug (debugging features)Please ensure sound practices are in place for backing up data.
Need the same configuration as for production (see above).
Install rerun Gem, using gem install rerun, or pick another way to reload server.
Need to
openPaths arrayaddPermissions call, with a wildcard permission: e.g. addPermission('get', v(''), ['*'])Content type
Image
Digest
Size
332.7 MB
Last updated
about 8 years ago
docker pull disarm/disarm-server