- Install Docker Compose.
- 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).
- Create a symlink from either
docker-compose.local.yml
ordocker-compose.server.yml
todocker-compose.yml
(e.g.ln -s docker-compose.local.yml docker-compose.yml
). Otherwise, you'll have to prefix all Docker Compose commands likedocker-compose -f docker-compose.local.yml
. - Pull the latest images from Docker Hub:
docker-compose pull
. - Build any overridden images:
docker-compose build
. - Edit the appropriate environment file,
envfile.local.txt
orenvfile.server.txt
, filling in all mandatory variables, and optional variables as needed. - Server-specific:
- Make a
secrets
directory in the project root and copy the SSL certificate and key files tosecrets/ssl.crt
andsecrets/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 inenvfile.server.txt
. - 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 theextra_hosts
directives indocker-compose.server.yml
. - Optionally clear persisted files from previous runs:
sudo rm -rf .vols/ log/
- Optionally stop and clear previously built
kobo-docker
containers:docker-compose stop; docker-compose rm -f
- As a temporary workaround to avoid a race condition, manually initiate
kpi
database sync and migrations (quit withCTRL+C
once UWSGI has started):docker-compose -f run --rm kpi
- As a temporary workaround to avoid a race condition, manually initiate
dkobo
(yes, really) database sync and migrations, and initialize an admin user with credentialskobo:kobo
(quit withCTRL+C
once UWSGI has started):docker-compose run --rm dkobo
- As a temporary workaround to avoid a race condition, manually initiate
kobocat
database sync and migrations (quit withCTRL+C
once UWSGI has started):docker-compose run --rm kobocat
- Start the server:
docker-compose up
(or withup -d
to run in background) - 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
.
- KoBoCAT login redirect (e.g https://kf-local.kobotoolbox.org/accounts/login/?next=/kobocat/ -> https://kf-local.kobotoolbox.org/kobocat/ ->
404
) - SMTP e-mail?
- Maps?