Private networking issue when deploying from Docker Hub

karlbateman
HOBBY

15 days ago

I have two services, one is public and the other is private. I have set the address of the private container using variable references within the public container, however when issuing a HTTP request I'm getting a "connection refused" error.

{
  ...
  "baseURL": "http://karlbateman/praetorian.railway.internal:3000",
  "code": "ECONNREFUSED"
}

The public container uses an env variable so the base URL of the private container can be set, this is configured using the following variable references:

API_BASE_URL=http://${{karlbateman/praetorian.RAILWAY_PRIVATE_DOMAIN}}:${{karlbateman/praetorian.PORT}}

The private service is a relatively simple Go application deployed via a Docker Image. The service is configured to bind to both IPv4 and IPv6 addresses

I suspect the issue comes from the private address being prefixed with karlbateman/ because when deploying this service directly from the repo, the private address is [http://praetorian.railway.internal:3000](http://praetorian.railway.internal:3000) which works as expected.

0 Replies

karlbateman
HOBBY

15 days ago

e08d1f8c-0f44-451f-a5eb-55e9224e9f13