I have a server running docker already and several containers running different applications. I need to install Central on that. I assume default ODK installation script assumes that the server is totally dedicated for ODK, and hence installs everything. Would it be causing issues in existing docker and/or other containers? Is there any guidance about how to install ODK central on a server already running docker?
Happy Easter! If you already have docker installed on a server, there shouldn’t be any real harm in installing ODK Central alongside your existing applications. Make sure you have enough space remaining on your server (both memory and hard drive space) before you run up ODK and start depending on it.
The main thing you’ll want to consider is port conflicts. If you have an existing application already using port 80/443, you may need to change ODK’s ports using the HTTP_PORT and HTTPS_PORT variables in your ODK Central’s .env file as described here.
If you have multiple applications on the same server, you may already have a reverse proxy to those applications. If so, just make sure that you’ve told ODK to use upstream SSL in your .env (SSL=upstream), and use whatever your existing method is to get an HTTPS certificate for your ODK server.
Thanks. How do I customize the install script? Or would the original script be able to detect docker+containers and skip over that part? Any chance the installation would disturb the installed environment?
Yes I have reverse proxy and will manage it for the ports.
If I understand your setup correctly, you won’t need to customize any installation script. The ODK install will be the same docker compose up process described here.
You’ll just want to follow the regular installation instructions, with the following modifications:
Pick some unused ports for ODK to use for HTTP and HTTPS traffic. For example, 5080 and 5443. Write those to your .env file as HTTP_PORT and HTTPS_PORT, respectively.
Go into your reverse proxy and map your domain name for ODK to those ports. Say, you want your website to be odk.saad.org. You’ll want to make http://odk.saad.org map to your local port 5080 and https://odk.saad.org map to your local port 5443, with the appropriate TLS certificate.
After you have done this configuration, then spin up your docker compose up -d and you should be able to access it via https://odk.saad.org.