<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sourabh Shankar on Medium]]></title>
        <description><![CDATA[Stories by Sourabh Shankar on Medium]]></description>
        <link>https://medium.com/@sourabh_shankar?source=rss-4760828520b0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3PQiQrxAByKcGORCTM9lzQ.jpeg</url>
            <title>Stories by Sourabh Shankar on Medium</title>
            <link>https://medium.com/@sourabh_shankar?source=rss-4760828520b0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 01:33:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sourabh_shankar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Why use Meteor Up(MUP) to deploy your app?]]></title>
            <link>https://medium.com/@sourabh_shankar/why-use-meteor-up-mup-to-deploy-your-app-9c65e6da434a?source=rss-4760828520b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c65e6da434a</guid>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[meteor-up]]></category>
            <category><![CDATA[upm]]></category>
            <category><![CDATA[meteor]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Sourabh Shankar]]></dc:creator>
            <pubDate>Fri, 15 Jun 2018 14:45:03 GMT</pubDate>
            <atom:updated>2019-03-01T14:57:23.257Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why use Meteor UP to deploy your app?</h3><h4>Learn the advantages and disadvantages of using Meteor Up (MUP). Hands On.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X27YQqAW3xmraziPcLK7-Q.png" /></figure><p>If you have deployed a Meteor app before then you know how easy and/or painful it can get. This is especially true if you are deploying it manually that is, creating the bundle file, uploading it to remote server and then installing all the required software, libraries, npm modules etc. The list goes on and on.</p><p>That’s when Meteor Up(MUP) comes into picture. Its really easy and intuitive CLI to deploy meteor app on any cloud server. It uses an automated process to deploy your code on remote server. However, you need to keep in mind some key concepts otherwise it will be too auto-magical for you and if things go southward, you will be clueless.</p><p><strong>KEY CONCEPTS</strong><br>Here are the key concepts that you need to keep in mind when using MUP:</p><ol><li>It uses docker images to deploy and run your code on remote server.</li><li>Separate docker images are created for meteor code and mongodb (don’t worry you can specify externally hosted mongodb as well).</li><li>Port(s) of Docker container running your code, is automatically mapped to port 80 and 3000.</li><li>Port of Docker container running your mongodb, is automatically mapped to port 27017.</li></ol><p><strong>LETS DO IT</strong><br>Lets assume we have a meteor app named “awesomeapp” that needs to be deployed on remote server.</p><ol><li>Install MUP CLI on your local machine (globally)</li></ol><pre>$ npm install - global mup</pre><p>2. Go to your app directory</p><pre>$ cd awesomeapp</pre><p>3. Create and go to a special directory for your deployment script (I keep separate directory for staging and production server i.e. “.deploy-stag” and “.deploy-prod”)</p><pre>$ mkdir .deploy-stag &amp;&amp; cd .deply-stag</pre><p>4. Create the mup.json file (to be used while deployment)</p><pre>$ mup init</pre><p>5. Now that your sample mup.json file is created, its time to edit it. Typically, following elements are changed in this.</p><pre>...<br>servers: {<br> one: {<br> // TODO: set host address, username, and authentication method<br> host: &#39;IP.OF.YOUR.SERVER&#39;,<br> username: &#39;ubuntu&#39;,<br> pem: &#39;~/.ssh/awesome-staging.pem&#39;<br> }<br> },<br>...<br>app: {<br> name: &#39;awesomeapp&#39;, //avoid hyphens<br> path: &#39;../&#39;, //relative to where app code reside in your local machine<br>...<br>env: {<br> // TODO: Change to your app&#39;s url<br> // If you are using ssl, it needs to start with https://<br> ROOT_URL: &#39;<a href="http://ip.of.your.server&/#39;">http://IP.OF.YOUR.SERVER&#39;</a>,<br> MONGO_URL: &#39;mongodb://mongodb/meteor&#39;,<br> MONGO_OPLOG_URL: &#39;mongodb://mongodb/local&#39;,<br> },<br>...<br>docker: {<br> // change to &#39;abernix/meteord:base&#39; if your app is using Meteor 1.4–1.5<br> image: &#39;abernix/meteord:node-8.4.0-base&#39;,<br> },<br>...<br>deployCheckWaitTime: 200,<br>...</pre><p>For detailed information about mup.json, please visit offical MUP doc here: <a href="http://meteor-up.com/docs.html">http://meteor-up.com/docs.html</a></p><p>6. If your app is using settings.json file, copy-paste the file inside .deploy-stag directory. (ALWAYS remember to copy-paste new file whenever you change settings.json)</p><p><strong>MUP CLI COMMANDS</strong><br>Now that we have created and modified your mup.json file and copied settings.json file into your .deploy-stag directory, its time for actual deployment.</p><ol><li>Type following command to setup the remote server (internally it uses mup.json file)</li></ol><pre>$ mup setup</pre><p>The above command will connect to remote server via SSH and prepare the server to app deployment. It will create the docker image for mongodb, do the port mapping and fire it up. In the end you will have a running mongodb instance inside a docker container.</p><p>2. Type following command to deploy your code (internally it uses both mup.json and settings.json files)</p><pre>$ mup deploy</pre><p>The above command will bundle your app locally, minify its code and then upload the code to remote server. Once its on remove server, it will create a docker image (based on image specified in mup.json), install all required software such as node, npm and node modules, copy all the app code inside it, make all the “env” variables.</p><p>In the end, you will have a docker container running your meteor code that is mapped to port 80 and 3000.</p><pre>Visit your app @ <a href="http://ip.of.your.server/">http://IP.OF.YOUR.SERVER</a></pre><p><strong>WHAT IF, MUP FAILED TO INSTALL (the good stuff :)</strong><br>Follow these steps to make your life easier.<br>1. Get details of what MUP is doing under the hood. Use -- verbose argument for it.</p><pre>$ mup setup --verbose</pre><p>and</p><pre>$ mup deploy --verbose</pre><p>These commands will show you exactly what it going on and where the MUP process is failed. Most of the time, process fails because of incompatible versions of meteor, node, npm and node modules. In these cases, <strong><em>make sure to specify correct docker image in mup.json</em></strong></p><p><strong>For Meteor v1.2–1.3</strong><br>Use kadirahq/meteord docker image.</p><p><strong>For Meteor v1.4–1.5</strong><br>Use abernix/meteord:base docker image.</p><p><strong>For Meteor v1.6</strong><br>Use abernix/meteord:node-8.4.0-base docker image.</p><p><strong>For Meteor v1.2–1.6</strong><br>Use zodern/meteor:root docker image.</p><p><strong>OTHER USEFUL MUP COMMANDS</strong></p><pre>$ mup reconfig — reconfigures app with new environment variables, Meteor settings, and it updates the start script.<br>$ mup stop — stop the app<br>$ mup start — start the app<br>$ mup restart — restart the app<br>$ mup logs [-f — tail=50] — view the app’s logs. Supports all of the flags from docker logs.<br>$ mup docker ps — view running docker container on remote server<br>$ mup mongo logs — view mongodb logs of remote server<br>$ mup status — view detailed info about docker images, port, env variables etc. of remote server</pre><p>What’s more? The official docs for mup is quite well written and covers all the settings, tweaks, how-tos that you can possibly asked for. <a href="http://meteor-up.com/docs.html">Go to MUP Docs</a> and have a look.</p><blockquote>However, I must say that you should deploy at least one app manually. That way, you will get to know exactly how a meteor app is bundled and deployed and all related tasks. If you are itching to do that, <a href="https://guide.meteor.com/deployment.html"><em>take a look official meteor deployment process</em></a></blockquote><p>As you have seen, MUP is a boon to meteor devs who just want to deploy their apps super quickly and without any headache. It just takes care of a LOT of tasks for you. So why not give it a try?</p><p>Comments and suggestions are welcome.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c65e6da434a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>