I’ve had a few issues running my services on fly.io, given my api gateway is exposed and has HTTP setup, while my API gateway calls my services via TCP. Now it runs normally in the local environment, and even in the Docker environment, with minor tweaks in the API gateway env from
to
Yet when I try to run it on here with the Docker image, I deploy services first and get their URL, like this(example URL):
Now for the patient service dicom.internal, it’s not connected because i have not created it yet, but as for the other 2, I have created and use the host address, remove the https and add .internal in it, which now, when the service runs, it returns me the EConnectRefused issue with the address ?
My guess would be IPv6. This is one of the things that’s most different from running locally within Docker: the .internal network is IPv6-only, and hence it only works on [::]…
$ fly ssh console -a imaging-service
# apt-get update
# apt-get install --no-install-recommends iproute2
# ss -ltnp
The Local Address column should be * or [::] and not 0.0.0.0.
Hope this helps!
Aside: Your [[services]] block is (non-intuitively) silently doing nothing, assuming that that is the configuration file for imaging-service. You only need [[services]] for .flycast and .fly.dev.
As a general tip, it’s best to run fly config validate --strict before each deploy. This will warn about many confusing situations that flyctl does not actually mention otherwise.