Coder Social home page Coder Social logo

robertoachar / docker-rabbitmq-node Goto Github PK

View Code? Open in Web Editor NEW
36.0 2.0 22.0 32 KB

:whale: A playground for Docker with RabbitMQ and Node.

License: MIT License

JavaScript 100.00%
docker docker-compose rabbitmq node microservices amqp round-robin live-reload

docker-rabbitmq-node's Introduction

docker-rabbitmq-node

License

A playground for Docker with RabbitMQ and Node.

Development

  • Cloning the repo
$ git clone https://github.com/robertoachar/docker-rabbitmq-node.git
  • Installing dependencies
$ npm install

Docker

  • Building an image
$ docker-compose build
  • Running containers
$ docker-compose up
  • Running containers with scale (round-robin)
$ docker-compose up --scale consumer=3
  • Stopping containers
$ docker-compose down

Author

Roberto Achar

License

MIT

docker-rabbitmq-node's People

Contributors

robertoachar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-rabbitmq-node's Issues

refusing to connect to Rabbitmq

consumer_1 | error: Error: connect ECONNREFUSED 172.24.0.2:5672
consumer_1 | at Object._errnoException (util.js:1022:11)
consumer_1 | at _exceptionWithHostPort (util.js:1044:20)
consumer_1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)

producer_1 | error: Error: connect ECONNREFUSED 172.24.0.2:5672
producer_1 | at Object._errnoException (util.js:1022:11)
producer_1 | at _exceptionWithHostPort (util.js:1044:20)
producer_1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14

Error in docker-compose logs

Hi,
I run your docker example, but in logs a got error msg.

producer_1  | [nodemon] 1.18.4
producer_1  | [nodemon] to restart at any time, enter `rs`
producer_1  | [nodemon] watching: *.*
producer_1  | [nodemon] starting `node src/index.js`
producer_1  | module.js:549
producer_1  |     throw err;
producer_1  |     ^
producer_1  | 
producer_1  | Error: Cannot find module 'winston'
producer_1  |     at Function.Module._resolveFilename (module.js:547:15)
producer_1  |     at Function.Module._load (module.js:474:25)
producer_1  |     at Module.require (module.js:596:17)
producer_1  |     at require (internal/module.js:11:18)
producer_1  |     at Object.<anonymous> (/usr/src/app/src/index.js:1:79)
producer_1  |     at Module._compile (module.js:652:30)
producer_1  |     at Object.Module._extensions..js (module.js:663:10)
producer_1  |     at Module.load (module.js:565:32)
producer_1  |     at tryModuleLoad (module.js:505:12)
producer_1  |     at Function.Module._load (module.js:497:3)
producer_1  | [nodemon] app crashed - waiting for file changes before starting...
consumer_1  | [nodemon] to restart at any time, enter `rs`
consumer_1  | [nodemon] watching: *.*
consumer_1  | [nodemon] starting `node src/index.js`
consumer_1  | module.js:549
consumer_1  |     throw err;
consumer_1  |     ^
consumer_1  | 
consumer_1  | Error: Cannot find module 'winston'
consumer_1  |     at Function.Module._resolveFilename (module.js:547:15)
consumer_1  |     at Function.Module._load (module.js:474:25)
consumer_1  |     at Module.require (module.js:596:17)
consumer_1  |     at require (internal/module.js:11:18)
consumer_1  |     at Object.<anonymous> (/usr/src/app/src/index.js:1:79)
consumer_1  |     at Module._compile (module.js:652:30)
consumer_1  |     at Object.Module._extensions..js (module.js:663:10)
consumer_1  |     at Module.load (module.js:565:32)
consumer_1  |     at tryModuleLoad (module.js:505:12)
consumer_1  |     at Function.Module._load (module.js:497:3)
consumer_1  | [nodemon] app crashed - waiting for file changes before starting...```

some error in nodemon command?

$ docker-compose up
...
Attaching to dockerrabbitmqnode_rabbitmq_1, dockerrabbitmqnode_consumer_1, dockerrabbitmqnode_producer_1
producer_1 | Usage: nodemon [nodemon options] [script.js] [args]
producer_1 |
producer_1 | See "nodemon --help" for more.
producer_1 |
consumer_1 | Usage: nodemon [nodemon options] [script.js] [args]
consumer_1 |
consumer_1 | See "nodemon --help" for more.
consumer_1 |
dockerrabbitmqnode_producer_1 exited with code 0
dockerrabbitmqnode_consumer_1 exited with code 0

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.