Fix port mapping logic
Prevent crash if neither ELASTICSEARCH_PORT nor ELASTICSEARCH_PORT_9200 env vars are set.
Previous logic was unnecessarily complex. Docker compose will happily parse :9200 port mapping and use an ephemeral port.
The env vars for configuring port mappings is now in the format {SERVICE}_PORT_{INTERNAL_PORT_NUMBER} e.g. MYSQL_PORT_3306.
Bug: T387729