1. What is the issue? Please be detailed.
I've been able to install ODK Central on a VPS following the instructions, and also using a service that offers CI/CD to deploy by getting a project from Github, On the VPS I left the ports as default and it works correctly, but with the CICD I had to change:
# Options: letsencrypt, customssl, upstream, selfsign
SSL_TYPE=upstream
# Do not change if using SSL_TYPE=letsencrypt
HTTP_PORT=3000
HTTPS_PORT=8443
Checking with https://www.sslshopper.com/ssl-checker.html results OK.
I can access ODK Central, create forms but can't preview/test with Enketo. I can't download with Collect either. If I change to legacy QR Code I can see the forms but not download them.
It is the same error as this post:
I see the Github issue is closed, but not sure if it is fixed or how to fix.
2. What steps can we take to reproduce this issue?
I have no affiliation with the CICD service and I don't know if I'm allowed to post the link here, so I'll wait for permission before posting the procedure. But I guess it's not related to a specific service, but with using non default ports in any installation.
I didn't make that change, I can't test right now but will check during the week.
The service is by Elestio, they have an option to deploy from Github. Elestio CICD overview
I forked Central and then tested the deploy with Elestio and Github, it failed because of postgres installation, so I created a branch and added preinstall.sh and predeploy.sh to my branch and in the configuration on Elestio I added them too in the Life cycle scripts section
Then I think I started to get errors about ports being in use, and checking with the terminal I saw they have openresty running and using those ports. That's why I changed the ports in .env and I think I changed the SSL type because I saw the server was already providing SSL.
With those changes the deployment finished completely, I created the admin user via terminal and could login and upload a form. But then when trying to test the form with Enketo I get an error that it can't open the form, and when using Collect with the default QR code it wasn't able to download the forms. Then when I switched to legacy QR code I could see the form in the list, but still could not download.
HTTPS 443 -> HTTP 172.17.0.1 8989 /
(note that I am pointing to the http)
First run obviously failed because Elestio installs old version of docker engine and docker compose. ODK Central needs "Docker Engine v23.x and Docker Compose v2.16.x or greater".
1- Update Docker:
I opened the terminal from Elestio, uninstalled the existing docker by following this instruction and then install the latest version using this instruction.
Thank you very much @Sadiq_Khoja for the pointers, I managed to deploy too.
Some observations:
Seems the Docker version is OK, but they don't have compose plugin installed
root@odkcentral-u:/opt/app/central# docker --version
Docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1
root@odkcentral-u:/opt/app/central# docker compose version
docker: 'compose' is not a docker command.
See 'docker --help'
So for the deployment I used a mix of your instructions and from Elestio.
Updated docker-compose.yml per your instructions above.
Left the build and run commands as they are originally set by Elestio, but added the preinstall and predeploy scripts in the life cycle
Changed Environment variables and Reverse proxy per your instructions above.
After successful deployment, enter via terminal and add and promote user. Because compose is not installed, I had to use docker commands directly (with help of ChatGPT I "translated" the docker compose commands to docker commands).
My initial test was OK, I was able to download the form using Collect and also test with Enketo. I'll keep testing and see if everything works as expected.