是否可以使用 MUP 从多台计算机部署/管理相同的应用程序

is it possible to use MUP to deploy / manage same app from multiple computers

最近 (04/24/2019) 我在办公室 ubuntu 16.04 桌面计算机上安装了 MUP,并将 Meteor App 部署到云服务器上,效果很好!爱它。

但我家里有一台 MacBook;现在我只能在办公电脑上做mup reconfig/mup stop /start,我怎么在我的Macbook上做呢?

两台计算机都有应用程序库(包括 .deploy 和 mup.js..)。 我试图搜索 MUP 文档,但没有成功。 谢谢!

添加了 mup.js

module.exports = {
  servers: {
    one: {
      // TODO: set host address, username, and authentication method
      host: '1.1.1.1',
      username: 'ubuntu',
      pem: '/home/rjiao/.ssh/AlltechTC00'
      // password: 'Server_password'
      // or neither for authenticate from ssh-agent
    }
  },

  app: {
    // TODO: change app name and path
    name: 'FAMaster',
    path: '../',

    servers: {
      one: {},
    },

    buildOptions: {
      serverOnly: true,
    },

    env: {
      // TODO: Change to your app's url
      // If you are using ssl, it needs to start with https://
      ROOT_URL: 'http://1.1.1.1',
      MONGO_URL: 'mongodb://mongodb/meteor',
      MONGO_OPLOG_URL: 'mongodb://mongodb/local',
    },

    docker: {
      // change to 'abernix/meteord:base' if your app is using Meteor 1.4 - 1.5
      image: 'abernix/meteord:node-8.4.0-base',
    },

    // Show progress bar while uploading bundle to server
    // You might need to disable it on CI servers
    enableUploadProgressBar: true
  },

  mongo: {
    version: '4.0.6',
    servers: {
      one: {}
    }
  },

  // (Optional)
  // Use the proxy to setup ssl or to route requests to the correct
  // app when there are several apps

  // proxy: {
  //   domains: 'mywebsite.com,www.mywebsite.com',

  //   ssl: {
  //     // Enable Let's Encrypt
  //     letsEncryptEmail: 'email@domain.com'
  //   }
  // }
};

我经常做你想做的事。

我的工作和家里的计算机都设置了开发环境,还有一个部署文件夹,每个部署目标都有子文件夹,即暂存和生产。

所以我只是 cd 到相关文件夹,确保我的 ssh-agent 已加载,然后执行 mup deploy

您必须确保环境在本地是最新的,即您已加载所有 npm 模块,来自您的 repo 的最新代码,并且它可以正常运行您的测试。那么一切都应该是甜蜜的。

我还有一个 CI 服务器,可以自动部署从 develop 分支到我的登台服务器,以及 master 到生产。

一切都很好。