this is not an official kobotoolbox repository, okay?
have your Enketo and develop it, too!
As a developer, I would like to run things I don't change inside Docker (KoboToolbox and associated databases, and Redis). I would like full, manual control over running code that I do change (Enketo Express). I would like simplicity in configuration with sensible defaults and a minimum of mandatory customization. If this sounds like a topsy-turvy kobo-no-docker, that's because it is :)
- clone this repository
- execute
first-run.sh
, which will:- pull docker images
- start databases
- run kpi and kobocat database migrations
- prompt you to create a superuser
- remind you that you shouldn't test things as a superuser :)
docker-compose up
, which should yield:- kpi running on 10.6.7.1:8006
- kobocat running on 10.6.7.1:8007
- postgres, on 10.6.7.1:60666
- redis, on 10.6.7.1:60667
- mongo, on 10.6.7.1:60668
- set up an Enketo (javascript) development environment!
- clone https://github.com/enketo/enketo-express
- 🎯 copy the file
enketo-config.json
toconfig/config.json
inside yourenketo-express
clone cd
into yourenketo-express
source directorynvm use 16
, or whatever you cool kids like- important:
npm install -g npm@6
(why?) npm install
- don't be surprised if "extract:rxjs" appears to be stuck for seven or more minutes
npx grunt develop
- now Enketo should be running on port 8005 (at 10.6.7.1 as well as all
your other IPs!)
- verify by going to http://10.6.7.1:8005/
- test it out
- log into kpi at http://10.6.7.1:8006/
- create and deploy a new form
- verify that it opens in Enketo
- make some change to Enketo: for example, modify
console.log('autosave successful')
inpublic/js/src/module/controller-webform.js
- watch for Enketo to automatically reload with your changes
- django is set to use the console email backend, so you can do things like
create user accounts and read the activation email details right from the
logs of the kpi container, i.e.
docker-compose logs -f kpi
- some things just don't work without nginx (like serving attachments? need to confirm)