rodei o comando docker-compose up
e acontece o seguinte, não consigo acessar os serviços que foram configurados, alguém poderia me ajudar?
alura-books-1 | Server initialiazed on port 3000
alura-books-1 |
alura-books-1 | Mongoose! Disconnected from mongodb://mongodb:27017/alura-books
alura-books-1 |
alura-books-1 | Mongoose! Connection error: MongoError: failed to connect to server [mongodb:27017] on first connect [Error: connect ECONNREFUSED 172.19.0.2:27017
alura-books-1 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
alura-books-1 | name: 'MongoError'
alura-books-1 | }]
alura-books-1 |
alura-books-1 | /var/www/node_modules/mongodb-core/lib/topologies/server.js:336
alura-books-1 | return self.emit('error', new MongoError(f('failed to connect to server [%s] on first connect [%s]', self.name, err)));
alura-books-1 | ^
alura-books-1 | Error [MongoError]: failed to connect to server [mongodb:27017] on first connect [Error: connect ECONNREFUSED 172.19.0.2:27017
alura-books-1 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
alura-books-1 | name: 'MongoError'
alura-books-1 | }]
alura-books-1 | at Pool.<anonymous> (/var/www/node_modules/mongodb-core/lib/topologies/server.js:336:35)
alura-books-1 | at Pool.emit (node:events:520:28)
alura-books-1 | at Connection.<anonymous> (/var/www/node_modules/mongodb-core/lib/connection/pool.js:280:12)
alura-books-1 | at Object.onceWrapper (node:events:640:26)
alura-books-1 | at Connection.emit (node:events:520:28)
alura-books-1 | at Socket.<anonymous> (/var/www/node_modules/mongodb-core/lib/connection/connection.js:189:49)
alura-books-1 | at Object.onceWrapper (node:events:640:26)
alura-books-1 | at Socket.emit (node:events:520:28)
alura-books-1 | at emitErrorNT (node:internal/streams/destroy:164:8)
alura-books-1 | at emitErrorCloseNT (node:internal/streams/destroy:129:3)
alura-books-1 | at processTicksAndRejections (node:internal/process/task_queues:83:21)
alura-books-1 |
alura-books-1 | Node.js v17.4.0