meteormup

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


lately (04/24/2019) I install the MUP on my office ubuntu 16.04 desktop computer and deploy a Meteor App to a cloud server, it works great! love it.

but I have a MacBook at home; now I can only do mup reconfig/mup stop /start on office computer, how can I do it on my Macbook?

Both computers have the app repo (include the .deploy and mup.js..). I tried to search through the MUP documents but no luck. thanks!

added the 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'
  //   }
  // }
};

Solution

  • I do exactly what you want on a regular basis.

    I have computers at work and home that have the dev environment set up, and also a deploy folder, with sub-folders for each deployment target, ie staging and production.

    So I just cd to the relevant folder, make sure my ssh-agent is loaded, and do a mup deploy

    You have to make sure that the environment is up to date locally, ie you have all the npm modules loaded, the latest code from your repo, and it runs your tests ok. Then everything should be sweet.

    I also have a CI server that does automatic deployments from develop branch to my staging server, and master to production.

    It all works very well.