gpt4 book ai didi

linux - meteor 部署 : mupx setup and mupx deploy errors

转载 作者:太空宇宙 更新时间:2023-11-04 12:33:21 26 4
gpt4 key购买 nike

在 Aws EC2 Linux 服务器上安装 Meteor 应用程序。我在 mupx 设置和 mupx 部署时遇到错误,如下所示。

在 mup.json 文件中,当 "setupMongo": true 时,我得到了这个错误。

**Started TaskList: Setup (linux)**
[52.33.176.16] - Installing Docker
[52.33.176.16] - Installing Docker: SUCCESS
[52.33.176.16] - Setting up Environment
[52.33.176.16] - Setting up Environment: SUCCESS
[52.33.176.16] - Copying MongoDB configuration
**[52.33.176.16] x Copying MongoDB configuration: FAILED
Received exit code 0 while establishing SFTP session**

当我设置 "setupMongo": false 时,mupx 设置命令可以像这样正常工作。

Started TaskList: Setup (linux)
[52.33.176.16] - Installing Docker
[52.33.176.16] - Installing Docker: SUCCESS
[52.33.176.16] - Setting up Environment
[52.33.176.16] - Setting up Environment: SUCCESS

问题 1:当“setupMongo”为真时,mupx 设置肯定有什么问题?

mupx 设置工作正常后,我尝试了 mupx deploy 命令。我收到了这个错误。

Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
Configuration file : mup.json
Settings file : settings.json

“ Checkout Kadira!
It's the best way to monitor performance of your app.
Visit: https://kadira.io/mup ”

Meteor app path : /var/www/html/meteor/test
Using buildOptions : {}
events.js:161
throw er; // Unhandled 'error' event
^

Error: spawn meteor ENOENT
at exports._errnoException (util.js:1028:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:422:7)
at startup (bootstrap_node.js:143:9)
at bootstrap_node.js:537:3

以下是重要的事情要知道

节点版本:v7.6.0npm版本:v4.1.2

mup.json 文件

{
// Server authentication info
"servers": [
{
"host": "52.33.176.16",
"username": "root",
//"password": "password",
// or pem file (ssh based authentication)
// WARNING: Keys protected by a passphrase are not supported
"pem": "~/.ssh/myPrivateKeyFile.pem",
// Also, for non-standard ssh port use this
//"sshOptions": { "port" : 49154 },
// server specific environment variables
"env": {}
}
],

// Install MongoDB on the server. Does not destroy the local MongoDB on future setups
"setupMongo": false,

// Application name (no spaces).
"appName": "test",

// Location of app (local directory). This can reference '~' as the users home directory.
// i.e., "app": "~/Meteor/my-app",
// This is the same as the line below.
"app": "/var/www/html/meteor/test",

// Configure environment
// ROOT_URL must be set to your correct domain (https or http)
"env": {
"PORT": 3000,
"ROOT_URL": "http://musissive.com"
},

// Meteor Up checks if the app comes online just after the deployment.
// Before mup checks that, it will wait for the number of seconds configured below.
"deployCheckWaitTime": 15,

// show a progress bar while uploading.
// Make it false when you deploy using a CI box.
"enableUploadProgressBar": true
// Make it false when you deploy using a CI box.
"enableUploadProgressBar": true
}

问题 2:这个错误是关于什么的?我正在尝试将 meteor 提供的简单 meteor 应用程序作为默认应用程序。

最佳答案

尝试使用 mup ( https://github.com/zodern/meteor-up ) 而不是 mupx
您可以使用此配置进行部署:

module.exports = {
servers: {
one: {
host: '111.111.111.111',
username: 'root',
pem: "/home/user/.ssh/id_rsa",
// password:
// or leave blank for authenticate from ssh-agent
// opts: {
// port: 22,
// },
}
},

meteor: {
name: 'projectname',
path: '/home/user/project-dir',
docker: {
image:'abernix/meteord:base', // of Meteor 1.4 +
},
servers: {
one: {},
},
buildOptions: {
serverOnly: true,
},
env: {
ROOT_URL: 'http://yourdomain.com/',
MONGO_URL: 'mongodb://localhost/meteor',
},

deployCheckWaitTime: 60 //default 10
},

mongo: {
oplog: true,
servers: {
one: {},
},
},
};

关于linux - meteor 部署 : mupx setup and mupx deploy errors,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42679297/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com