Dokomo Forms is a self-hosted data collection and analysis platform, and is the successor to Formhub.
-
Organization owns instance, and all users belong to the organization. (TODO)
-
Filesystem-level encryption. (TODO)
-
i18n
-
Focus on questions rather than surveys. (TODO)
-
You can specify configuration options in
local_config.py
or as command line flags to webapp.py. The available options are defined in dokomoforms/options.py -
webapp.py now sets up the tables for you (no more
manage_db.py
). If you want$ manage_db.py -d
, run
$ ./webapp.py --kill=True
You can also specify the schema you want like $ ./webappy.py --schema=whatever
- New way to run tests (after
$ pip install tox
):
$ tox
Or, if you want the coverage report as well,
$ tox -e cover
The tests only touch the doko_test
schema (which they create/destroy for you).
Docker is a container management software that aims at component separation and deployment automation. Please refer to the Docker API for a fuller introduction.
There is a Dockerfile in the root directory to build the Docker image of the Dokomo Forms webapp component building on top a Python 3 image. To build the webapp image, run
$ docker build -t selcolumbia/dokomoforms .
However, Dokomo Forms as a service needs other components such as the database in order to work. We have referenced mdillon/postgis
as the image, since we are using PostgreSQL with the PostGIS extension. You may also substitute mdillon/postgis
with any image includes PostGIS. A manual way to run Dokomo Forms as a service would involve starting the postgis
container and linking it to the Dokomo Forms image we have just built, such as:
$ docker run -d -p 8888:8888 --link postgis:db selcolumbia/dokomoforms
docker-compose
is the program that automates Docker container building, running, and linking as described above. It uses the docker-compose.yml file which is provided in the root directory.
To start the service locally, run:
$ docker-compose up
Docker will download the necessary images, then build and link them. This step takes 3-5 minutes for the first build. Once the command has finished, you can visit http://localhost:8888 and start using Dokomo Forms.
docker-machine
is the program that automates the deployment process. It can hook into many VPS providers such as AWS, Rackspace and DigitalOcean.
Here is an example using DigitalOcean:
- Obtain a token from DigitalOcean. Click on "Generate New Token" from the API page as indicated below.
- Create a droplet with the token you have just acquired
$ docker-machine create -d digitalocean --digitalocean-access-token YOUR_ACCESS_TOKEN dokomoforms
- Make your local Docker environment aware of this new machine
$ eval $(docker-machine env dokomoforms)
- Run
docker-compose
with the new environment
$ docker-compose up -d
Now you have an instance of Dokomo Forms running on your DigitalOcean droplet!