Docker deployment ends with nginx 404 error

Hi Haaret

Thank you for feedback and data. I now think that there’s a semantic question about versions that we’d should dig for a bit.
Ubuntu base is same as you mentioned, 18.04.03 LTS and it is in latest state, updated vanilla host :

q-user@vh-be-box:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic
q-user@vh-be-box:~$

As it comes to Docker & it’s tools, things differ, and the reason seems to be in how Docker is exactly deployed according to their Official KB Install Docker Engine on Ubuntu | Docker Docs

By using Docker’s “convenience script”, Edge version is installed and this was the case with initial thread report. Double checked, latest-edge on vanilla Ubuntu gives docker-compose version 1.20:

q-user@vh-be-box:~$ docker-compose -v
docker-compose version 1.20.0, build ca8d3c6

Therefore I tested Docker by using it’s primary deployment method of choise apt, that installs latest-stable version.
This gave me even older docker-compose:

root@vh-be-box:/home/q-user# docker-compose -v
docker-compose version 1.17.1, build unknown
root@vh-be-box:/home/q-user#

As expected with lower version, with stable-latest docker-compose.yml gave still the same error as initially:

q-user@vh-be-box:~$ docker-compose up
ERROR: Version in “./docker-compose.yml” is unsupported. You might be seeing this error because You’re using the wrong Compose file version. Either specify a supported version (e.g “2.2” or “3.3”) and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.
q-user@vh-be-box:~$

Stable and Edge versions are only used in production or prestaging environments. I agree that things can be solved by tiding things up in documentation with those aspects, the processes become critical in every large infrastructure when adopting any kind of software and documentation should reflect that, sure we can PR if I can help.

I was following GitHub - medic/medic-docs: Replaced by https://github.com/medic/cht-docs. This repo was the former source of documentation for developing, configuring, and using Medic Mobile tools. that leads to cht-core github project that has no Dockerfile I was trying to find for reverse-engineering, but Docker Hub images are built from medic-os project. Now I see that there is some additional documentation directly in medic-os github project.

Thank You for comments about cli, indeed I made error with volume names to be mounted. Extra port was due to a test I made.
Good tip about opening 5988, are there some other interfaces that could opened or closed optinally to help debugging while running prebuilt images “manually” with “docker run -it -d …”? CouchDB had also some management URL, _utils?

Now, with a modifications made in host environment and versions, this is the working cli version destilled from docker-compose file and feedback from You that shoots up frontpage of webapp:

export DOCKER_COUCHDB_ADMIN_PASSWORD=password123
docker volume create medic-data

docker run -it -d --name medic-os  -p 8080:80 -p 8443:443 --mount type=volume,source=medic-data,target=/srv -w /srv -e DOCKER_NETWORK_NAME=haproxy -e DOCKER_COUCHDB_ADMIN_PASSWORD=$DOCKER_COUCHDB_ADMIN_PASSWORD --network medic-net medicmobile/medic-os:cht-3.7.0-rc.1

docker run -it -d --name haproxy --mount type=volume,source=medic-data,target=/srv -w /srv --network medic-net -e COUCHDB_HOST=medic-os -e HA_PASSWORD=$DOCKER_COUCHDB_ADMIN_PASSWORD medicmobile/haproxy:rc-1.16

hostip:8443 shows Web UI now :slight_smile:

Wrap-up:

  1. Install Ubuntu Server 18.04 LTS
  2. Install Docker stable (including docker-compose. Docker Official stable installation does not include docker-compose, Edge does)
  3. CLI workaround
  4. Open UI

Regards,
Martin

1 Like