Temporary setup procedure:
- Install Docker Compose on 64-bit Linux. OS X and Windows power users can try the new Docker beta for those platforms.
- Determine whether you want to create an HTTP-only local instance of KoBo Toolbox, or a HTTPS publicly-accessible server instance. Local instances will use
envfile.local.txt, whereas server instances will use
Note: For server instances, you are expected to meet the usual basic requirements of serving over HTTPS. That is, DNS records for your domain and subdomains, a CA-signed wildcard (or SAN) SSL certificate valid for those subdomains, and some basic knowledge of Nginx server administration and the use of SSL.
- Based on your desired instance type, create a symlink named
ln -s docker-compose.local.yml docker-compose.yml). Alternatively, you can skip this step and explicitly prefix all Docker Compose commands like
docker-compose -f docker-compose.local.yml.
- Pull the latest images from Docker Hub:
docker-compose pull. Note: Be careful when pulling updated images to delete the old using
docker rmiso your drive doesn't fill up.
- Build any images you've chosen to manually override:
- Edit the appropriate environment file for your instance type,
envfile.server.txt, filling in all mandatory variables, and optional variables as needed.
- Server-only steps:
- Make a
secretsdirectory in the project root and copy the SSL certificate and key files to
secrets/ssl.keyrespectively. The certificate and key are expected to use exactly these filenames and must comprise either a wildcard or SAN certificate+key pair which are valid for the domain and subdomains specified in
- 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/hostsfile 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
- Make a
- Optionally stop and clear previously built
docker-compose stop; docker-compose rm.
- Optionally clear persisted files (e.g. the Postgres database) from previous runs, taking care that you are in the
sudo rm -rf .vols/ log/.
- Start the server:
docker-compose up -d(or without the
-doption to run in the foreground).
- Container output can be viewed with
docker-compose logs. For an individual container, logs can be viewed by using the container name from your
docker-compose logs enketo_express.
- Be sure to periodically update your containers, especially
nginx, for security updates by pulling new changes from this
kobo-dockerrepo then running e.g.
docker-compose pull && docker-compose up -d.
Docker Pull Command