Nast Server no expose port

Hello , i try up server nast, but the client no connect to the port 4222. I expose the port and add environment variable.

docker-compose.yml

services:
  nats-server:
    image: nats:latest
    ports:
      - '${MONITOR}:8222'
      - '${CLUSTER}:6222'
      - '${CLIENT}:4222'

dockerfile.koyeb

FROM koyeb/docker-compose

COPY . /app

CMD ["docker-compose", "-f", "/app/docker-compose.yml", "up"]

Hi, it seems you fixed your issue. Can you confirm?

no i can’t, i recieve timeout error.

my setting

Why did you add this CMD instruction?

Hello, now, i have other problema in my account.

before, my account was ricardomaespagnac@gmail.com, but, now, centralize koyeb in a new account with mail marcoespagnac@theroomsoftware.com, you can help me first with this?

It should be fixed.

thank you, i recovery my account, Now, how connect to the nats server on the port 4222.
the url is https://entire-kristi-theroom-eb6fa224.koyeb.app
but, port 4222 is public in url
https://entire-kristi-theroom-eb6fa224.koyeb.app/client

my netsjs client

Error: connect ENETUNREACH 2606:4700:10::6816:4ebe:4222
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) {
errno: -4062,
code: ‘ENETUNREACH’,
syscall: ‘connect’,
address: ‘2606:4700:10::6816:4ebe’,
port: 4222
}

Hi @Marco_Espagnac,

You should connect to entire-kristi-theroom-eb6fa224.koyeb.app/client:433
which we internally redirect to your app port 4222