Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Meteor Up (mup for short) is a command line tool that allows you to deploy any Meteor app to your own server. It supports any Open Solaris or Debian/Ubuntu 12.04 or higher servers.
Table of Contents
settings.json
npm install -g mup
If you are looking for password-based authentication, you need to install sshpass on your local development machine.
mkdir ~/my-meteor-deployment
cd ~/my-meteor-deployment
mup init
This will create two files in your Meteor Up project directory:
mup.json
is commented and easy to follow (it supports JavaScript comments).
{
// Server authentication info
"servers": [
{
"host": "hostname",
"username": "root",
"password": "password"
// or pem file (ssh based authentication)
// WARNING: Keys protected by a passphrase are not supported
//"pem": "~/.ssh/id_rsa"
// Also, for non-standard ssh port use this
//"sshOptions": { "Port" : 49154 }
}
],
// Install MongoDB on the server. Does not destroy the local MongoDB on future setups
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: nodeVersion defaults to 0.10.29 if omitted. Do not use v, just the version number.
"nodeVersion": "0.10.29",
// Install PhantomJS on the server
"setupPhantom": true,
// Application name (no spaces)
"appName": "meteor",
// Location of app (local directory)
"app": "/Users/arunoda/Meteor/my-app",
// Configure environment
"env": {
"PORT": 80,
"ROOT_URL": "http://myapp.com",
"MONGO_URL": "mongodb://arunoda:fd8dsjsfh7@hanso.mongohq.com:10023/MyApp",
"MAIL_URL": "smtp://postmaster%40myapp.mailgun.org:adj87sjhd7s@smtp.mailgun.org:587/"
},
// 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
}
mup setup
This will setup the server for the mup
deployments. It will take around 2-5 minutes depending on the server's performance and network availability.
Please ensure your key file (pem) is not protected by a passphrase. Also the setup process will require NOPASSWD access to sudo. (Since Meteor needs port 80, sudo access is required.)
You can add your user to the sudo group:
sudo adduser *username* sudo
And you also need to add NOPASSWD to the sudoers file:
sudo visudo
# replace this line
%sudo ALL=(ALL) ALL
# by this line
%sudo ALL=(ALL) NOPASSWD:ALL
When this process is not working you might encounter the following error:
'sudo: no tty present and no askpass program specified'
This is how Meteor Up will configure the server for you based on the given appName
or using "meteor" as default appName. This information will help you customize the server for your needs.
/opt/<appName>/app
upstart
with a config file at /etc/init/<appName>.conf
start <appName>
and stop <appName>
/var/log/upstart/<appName>.log
<appName>
For more information see lib/taskLists.js
.
mup deploy
This will bundle the Meteor project and deploy it to the server.
Meteor Up checks if the deployment is successful or not just after the deployment. By default, it will wait 10 seconds before the check. You can configure the wait time with the deployCheckWaitTime
option in the mup.json
.
You can use an array to deploy to multiple servers at once.
To deploy to different environments (e.g. staging, production, etc.), use separate Meteor Up configurations in separate directories, with each directory containing separate mup.json
and settings.json
files, and the mup.json
files' app
field pointing back to your app's local directory.
Sometimes, you might be using mrt
, or Meteor from a git checkout. By default, Meteor Up uses meteor
. You can ask Meteor Up to use the correct binary with the meteorBinary
option.
{
...
"meteorBinary": "~/bin/meteor/meteor"
...
}
mup logs -f
Mup can tail logs from the server and supports all the options of tail
.
After you've edit environmental variables or settings.json
, you can reconfigure the app without deploying again. Use the following command for that.
mup reconfig
This will also restart the app, so you can use it for that purpose even if you haven't changed the configuration file.
You can't access the MongoDB from the outside the server. To access the MongoDB shell you need to log into your server via SSH first and then run the following command:
mongo appName
Meteor UP supports multiple operating systems:
All you have to do is specify the type of os
(default linux
if omitted) when defining the server info:
{
"servers": [
{
"host": "my-linux-box",
"username": "root",
"password": "password"
},
{
"host": "my-solaris-box",
"username": "root",
"password": "password",
"os": "sunos"
}
],
}
Meteor Up supports multiple deployments to a single server. Meteor Up only does the deployment; if you need to configure subdomains, you need to manually setup a reverse proxy yourself.
Let's assume, we need to deploy production and staging versions of the app to the same server. The production app runs on port 80 and the staging app runs on port 8000.
We need to have two separate Meteor Up projects. For that, create two directories and initialize Meteor Up and add the necessary configurations.
In the staging mup.json
, add a field called appName
with the value staging
. You can add any name you prefer instead of staging
. Since we are running our staging app on port 8000, add an environment variable called PORT
with the value 8000.
Now setup both projects and deploy as you need.
If you are using binary npm modules either with meteor-npm or with some other package you can't deploy and run your app by default. That's because binaries in the bundle are not compatible with your deployment environment.
So, you need to specify in mup.json
the binary modules and which packages they are in.
{
...
"binaryNpmModules": {
"meteor-package-name": ["npm-module1", "npm-module2"]
}
...
}
If you need to see the output of meteor-up
(to see more precisely where it's failing or hanging, for example), run it like so:
DEBUG=* mup <command>
where <command>
is one of the mup
commands such as setup
, deploy
, etc.
FAQs
Production Quality Meteor Deployments
The npm package mup receives a total of 162 weekly downloads. As such, mup popularity was classified as not popular.
We found that mup demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.