nats-io / nats-docker

Official Docker image for the NATS server
Apache License 2.0
132 stars 44 forks source link

Problem running NATS service in GitHub Actions #169

Open diogobaeder opened 2 months ago

diogobaeder commented 2 months ago

Hi folks,

I'm trying to run NATS as a service in GitHub Actions, but I can't get it to run correctly somehow. Here's how I'm running it, with a few health check options that I added after I noticed that the service was unreachable:

      nats:
        image: nats
        options: >-
          --health-cmd "nats account info"
          --health-interval 2s
          --health-timeout 2s
          --health-retries 2
        ports:
          - 4222:4222
          - 6222:6222
          - 8222:8222

Does anyone spot anything wrong with the block above? Even if I leave out the health check, I just can't access it using hostname nats, and with the health check it just fails hard when spawning the container.

Thanks!