help wanted
Description
I use docker-compose to run multi-container environment. But I can't integrate adminMongo into it.
Here is my docker-compose.yml:
version: '2'
services:
// other services
adminmongo:
build: ./adminmongo
ports:
- "1234:1234"
links:
- mongodb
volumes:
- "./adminmongo/app.js:/config/app.js:ro"
adminmongo/Dockerfile:
FROM mrvautin/adminmongo
EXPOSE 1234
adminmongo/app.js
module.exports = {
"app": {
"host": "localhost",
"port": 1234,
"locale": "en",
"context": "dbApp",
"monitoring": true
}
}
When I run docker-compose up, the only output from this container I'm getting is:
docker_adminmongo_1 exited with code 0
If I rename app.js to app.json and change the filename in docker-compose.yml, here is what I'm getting:
adminmongo_1 | module.js:472
adminmongo_1 | throw err;
adminmongo_1 | ^
adminmongo_1 |
adminmongo_1 | Error: Cannot find module '/config/app.js'
adminmongo_1 | at Function.Module._resolveFilename (module.js:470:15)
adminmongo_1 | at Function.Module._load (module.js:418:25)
adminmongo_1 | at Module.runMain (module.js:605:10)
adminmongo_1 | at run (bootstrap_node.js:420:7)
adminmongo_1 | at startup (bootstrap_node.js:139:9)
adminmongo_1 | at bootstrap_node.js:535:3
...
docker_adminmongo_1 exited with code 1
I'm not sure if it's the docker issue or I set up something wrong, can you please help me figuring this out?