我有带有文件的流星应用程序mup.js
。mongo数据库的端口同样设置为27018。
module.exports = {
servers: {
...
},
meteor: {
...
env: {
PORT: 3000,
ROOT_URL: 'http://app.com',
MONGO_URL: 'mongodb://localhost:27018/meteor',
},
docker: {
image: 'abernix/meteord:base',
imagePort: 9090, // (default: 80, some images EXPOSE different ports)
},
...
},
mongo: {
port: 27018,
version: '3.4.1',
servers: {
...
}
}
};
我想在端口 27018 上有 mongo,因为在服务器上,端口 27017 上有 mongo。但是当我输入:
mup setup
我得到:
-----------------------------------STDERR-----------------------------------
Error response from daemon: Container
bb3277bc8eb71f7dc943bee81b429e0ff0343e5905f6695ed2c7cad2b562317f is not
running docker: Error response from daemon: driver failed programming
external connectivity on endpoint mongodb
(fd60247139585238bfa24a42d2fd6221c08e2d2a053d4d03ffedbbab5604fd9a): Error
starting userland proxy: listen tcp 127.0.0.1:27017: bind: address already in
use.
-----------------------------------STDOUT-----------------------------------
3.4.1: Pulling from library/mongo Digest:
sha256:aff0c497cff4f116583b99b21775a8844a17bcf5c69f7f3f6028013bf0d6c00c
Status: Image is up to date for mongo:3.4.1 mongodb mongodb
Running mongo:3.4.1
7dcf91a6f136d85a884323c0a1230a673d8f25a9197dc85738e44e30139c6035
----------------------------------------------------------------------------
如何确保使用端口 27018 而不是 27017?