Public | Automated Build

Last pushed: 2 years ago
Short Description
https://github.com/kobotoolbox/kobo-docker/tree/master/base_images/base-dkobo
Full Description

Temporary setup procedure:

  1. Install Docker Compose on Linux or OS X. Windows power users who've installed Python and pip can try this hint from the Docker Compose repository.
  2. Determine whether you want to create an HTTP-only local instance of KoBo Toolbox, or a HTTPS publicly-accessible server instance (for testing, there are workarounds if your server is not yet publicly accessible).
  3. Create a symlink from either docker-compose.local.yml or docker-compose.server.yml to docker-compose.yml (e.g. ln -s docker-compose.local.yml docker-compose.yml). Otherwise, you'll have to prefix all Docker Compose commands like docker-compose -f docker-compose.local.yml.
  4. Pull the latest images from Docker Hub: docker-compose pull.
  5. Build any overridden images: docker-compose build.
  6. Edit the appropriate environment file, envfile.local.txt or envfile.server.txt, filling in all mandatory variables, and optional variables as needed.
  7. Server-specific:
    1. Make a secrets directory in the project root and copy the SSL certificate and key files to secrets/ssl.crt and secrets/ssl.key respectively. The certificate and key are expected to use exactly these names and must comprise a wildcard or SAN certificate valid for the domain and subdomains named in envfile.server.txt.
    2. If testing on a server that is not publicly accessible at the subdomains you've specified in envfile.server.txt, put an entry in your host machine's /etc/hosts file for each of the three subdomains you entered to reroute such requests to your machine's address (e.g. 192.168.1.1 kf-local.kobotoolbox.org). Also, uncomment and configure the extra_hosts directives in docker-compose.server.yml.
  8. Optionally clear persisted files from previous runs: sudo rm -rf .vols/ log/
  9. Optionally stop and clear previously built kobo-docker containers: docker-compose stop; docker-compose rm
  10. As a temporary workaround to avoid a race condition, manually initiate kpi database sync and migrations (quit with CTRL+C once UWSGI has started): docker-compose run --rm kpi
  11. As a temporary workaround to avoid a race condition, manually initiate dkobo (yes, really) database sync and migrations, and initialize an admin user with credentials kobo:kobo (quit with CTRL+C once UWSGI has started): docker-compose run --rm dkobo
  12. As a temporary workaround to avoid a race condition, manually initiate kobocat database sync and migrations (quit with CTRL+C once UWSGI has started): docker-compose run --rm kobocat
  13. Start the server: docker-compose up (or with up -d to run in background)
  14. Logs for an individual container can be viewed by using the container name from your docker-compose.yml with e.g. docker-compose logs enketo_express.

TODO

Docker Pull Command
Owner
kobotoolbox
Source Repository