GithubHelp home page GithubHelp logo

docker-compose example about nats.docs HOT 6 CLOSED

nats-io avatar nats-io commented on July 20, 2024
docker-compose example

from nats.docs.

Comments (6)

wallyqs avatar wallyqs commented on July 20, 2024

Hi, here you can find an example of setting a cluster using Docker Compose: https://github.com/nats-io/docs/blob/a27d9248fa14688f6be7a0ac9bf25744cab58a5a/nats_docker/README.md#creating-a-nats-cluster-with-docker-compose

from nats.docs.

wallyqs avatar wallyqs commented on July 20, 2024

Here is an example of using a custom configuration file with volumes using Docker Compose.

  • First create a network and config file, for example:
docker network create nats

mkdir config
echo '
debug = true
trace = true
' > config/nats.conf

Then point within the compose file to point to that file:

version: "3"
services:
  nats:
    image: nats
    command: "-c /etc/nats/nats.conf --cluster nats://0.0.0.0:6222 --routes=nats://ruser:T0pS3cr3t@nats:6222"
    volumes:
       - ./config/:/etc/nats
networks:
  default:
    external:
      name: nats

Use multiple replicas by using scale parameter:

docker-compose -f docker-compose.yaml up --scale nats=3

from nats.docs.

tobiasmuecksch avatar tobiasmuecksch commented on July 20, 2024

@wallyqs Thanks. This information is helpful. I'd suggest to add it to the readme!

from nats.docs.

derekcollison avatar derekcollison commented on July 20, 2024

from nats.docs.

wallyqs avatar wallyqs commented on July 20, 2024

Adding example here: https://github.com/nats-io/docs/pull/91/files

from nats.docs.

gcolliso avatar gcolliso commented on July 20, 2024

@wallyqs the example should go in the nats.docs repo

from nats.docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.