ODK Central - Multiple Instances Within Same Docker on a VM

Is it possible to have multiple instances (e.g. test/prod) within the same docker on a VM, or would you need multiple VMs/dockers?

Yes, it is possible to have multiple instances on the same machine. Those instances must be configured to listen on different HTTP/HTTPS ports (e.g., 8080/8443 and 9090/9443) and use upstream SSL. Then you must have a reverse proxy with SSL that routes traffic to the appropriate instance based on hostname.

That said, even though the instances are technically separate, running test and prod on the same VM is not a great idea. If someone fat-fingers a docker system prune, both instances will go down. And if someone tries a million submission export on test, prod performance will likely be affected.

The bare minimum for me is 2 VMs on the host (e.g., using vSphere or ESXI). The safest approach is 2 hosts, each with a VM running a single Central install. And ideally, the prod install talks to another host with a standalone DB and that DB is replicated for the test install so you are testing with realistic data.

4 Likes