How can I run NodeJs in Docker and Connect it with MongoDB and RabbitMQ?
Do I need to run it in with docker-compose?
And also I need 2 environment
- Run nodejs application in a development environment with
nodemon. - The Second environment is production experiment
node app.js
I found this docker-compose yml, but I can not understand how to connect it from nodejs
services:
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: rabbitmq
environment:
RABBITMQ_ERLANG_COOKIE: ${RABBITMQ_ERLANG_COOKIE}
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}