Voice is the most universal and inclusive means of communication, and it's an ideal way to expand the reach and impact of health and humanitarian technologies. Verboice is a free and open-source tool that makes it easy for anyone to create and run projects that interact via voice, allowing your users to listen and record messages in their own language and dialect or answer questions with a phone keypad. Verboice projects can start small and scale up, making it possible to improve lives even in communities previously closed off by literacy and technological barriers.
IMPORTANT: as of Sep 23rd, 2016, only Verboice's web app and DB components are dockerised. This is mainly useful to test interactions with other InSTEDD platform components that DON'T involve actually making or receiving calls (for example: managing channels with the help of Guisso and Pigeon).
docker-compose.yml file build a development environment mounting the current folder and running rails in development environment.
Run the following commands to have a stable development environment.
$ docker-compose run --rm --no-deps web bundle install $ docker-compose run --rm web bash root@web_1 $ rake db:setup db:seed $ docker-compose up
You can also run the frontend unit tests inside the docker container. Here's how:
$ docker-compose run --rm web rake db:test:prepare $ docker-compose run --rm web rspec
Testing with Zeus
Compounding Docker and Rails load times makes for a terrible out of the box testing experience. To mitigate that, we use Zeus (https://github.com/burke/zeus). Zeus pre-loads your Rails application so you only pay the initialization cost once.
Dockerfile.dev creates an image with Zeus already installed on it. To run tests with Zeus, first you need to:
- From the app root, run:
zeus init. This is a one time process that will create a couple of files
- To start Zeus, from the app root, run:
- From another terminal, run
zeus test specto run tests.
Deploying with Capistrano
Verboice is deployed with Capistrano. After
bundle installing, run:
$ cap -s branch=feature/my_branch deploy HOSTS=verboice-stg.instedd.org RVM=1
This will deploy
feature/my_branch code to the host at
verboice-stg.instedd.org using RVM. Your mileage may vary.