Skip to content

Instantly share code, notes, and snippets.

@sunlee-newyork
Last active February 2, 2017 14:31
Show Gist options
  • Save sunlee-newyork/b4d2a57fd2bb44fdf5f8b7e0f0a5ff52 to your computer and use it in GitHub Desktop.
Save sunlee-newyork/b4d2a57fd2bb44fdf5f8b7e0f0a5ff52 to your computer and use it in GitHub Desktop.

Revisions

  1. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions digitalocean-mup-meteor-1.4.md
    Original file line number Diff line number Diff line change
    @@ -22,10 +22,12 @@ The following are missing from this instructional (I aim to tackle these next):
    * SSL setup
    * Subdomains

    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues that stem from Meteor 1.4 + MUPX + default docker image + node version, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s%&# to work. Said issues are linked below under [References](#references).

    This is Part 1 of the Meteor/MongoDB deployment instructions where we'll setup a production Meteor application with MongoDB. If you want a remote Mongo database, follow instructions here until Step 7 of [Mup Setup](#mup-setup) at which point you'll break off to [these instructions](https://gist.github.com/sunlee-newyork/d797823582e59a532a3e3b92e492f023).

    I concocted these instructions from a multitude of sources, but they're mostly verbatim from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with edits to the NGINX/MUP portion and addition of a remote MongoDB server. The purpose of a new instructional is to address some recent issues that stem from Meteor 1.4 + MUPX + default docker image + node version, and also to make myself feel better for the last 15 hours I spent chainsmoking and getting this s%&# to work. Said issues are linked below under [References](#references).

    Please feel free to leave comments, questions, or edits as you see fit! I am by no means claiming to be an expert in anything. I just wanted to share a truly end-to-end working solution. Cheers!

    ## Droplet Setup
    1. `<chainsmoke>`
    2. Login to DigitalOcean and create a droplet
  2. Sun Lee revised this gist Jan 8, 2017. No changes.
  3. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions digitalocean-mup-meteor-1.4.md
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,7 @@ This is a working instructional to deploy a Meteor 1.4 app with the following (a
    * DigitalOcean Ubuntu 16.04
    * Meteor 1.4.2.3
    * MUP (not MUPX)
    * MongoDB (local or remote)

    The following are missing from this instructional (I aim to tackle these next):

  4. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion digitalocean-mup-meteor-1.4.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,6 @@ This is a working instructional to deploy a Meteor 1.4 app with the following (a
    The following are missing from this instructional (I aim to tackle these next):

    * SSL setup
    * Remote MongoDB
    * Subdomains

    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues that stem from Meteor 1.4 + MUPX + default docker image + node version, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s%&# to work. Said issues are linked below under [References](#references).
  5. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion digitalocean-mup-meteor-1.4.md
    Original file line number Diff line number Diff line change
    @@ -24,6 +24,8 @@ The following are missing from this instructional (I aim to tackle these next):

    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues that stem from Meteor 1.4 + MUPX + default docker image + node version, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s%&# to work. Said issues are linked below under [References](#references).

    This is Part 1 of the Meteor/MongoDB deployment instructions where we'll setup a production Meteor application with MongoDB. If you want a remote Mongo database, follow instructions here until Step 7 of [Mup Setup](#mup-setup) at which point you'll break off to [these instructions](https://gist.github.com/sunlee-newyork/d797823582e59a532a3e3b92e492f023).

    ## Droplet Setup
    1. `<chainsmoke>`
    2. Login to DigitalOcean and create a droplet
    @@ -180,7 +182,7 @@ server {
    ```
    ...and then remove the following line from `mup.js`: `// "pem": "~/.ssh/id_rsa"`
    * At this point if you also want a separate remote MongoDB server, follow [these instructions] before moving on to the next step. Get the server up and running, and then come back and make the following edits to `mup.js`:
    * At this point if you also want a separate remote MongoDB server, follow [these instructions](https://gist.github.com/sunlee-newyork/d797823582e59a532a3e3b92e492f023) before moving on to the next step. Get the server up and running, and then come back and make the following edits to `mup.js`:
    ```
    module.exports = {
  6. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 44 additions and 6 deletions.
    50 changes: 44 additions & 6 deletions digitalocean-mup-meteor-1.4.md
    Original file line number Diff line number Diff line change
    @@ -172,12 +172,50 @@ server {
    },
    };
    ```
    There may be an issue with your PEM key if it's passphrase encrypted. Then, do the following:
    ```
    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_rsa
    ```
    ...and then remove the following line from `mup.js`: `// "pem": "~/.ssh/id_rsa"`
    * There may be an issue with your PEM key if it's passphrase encrypted. Then, do the following:

    ```
    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_rsa
    ```
    ...and then remove the following line from `mup.js`: `// "pem": "~/.ssh/id_rsa"`
    * At this point if you also want a separate remote MongoDB server, follow [these instructions] before moving on to the next step. Get the server up and running, and then come back and make the following edits to `mup.js`:
    ```
    module.exports = {
    servers: {
    one: {
    host: 'yourdomain.com',
    username: 'your_droplet_username'
    // pem: '~/.ssh/id_rsa'
    // password:
    // or leave blank for authenticate from ssh-agent
    }
    },
    meteor: {
    name: 'yourappnamewithoutspaces',
    path: '/local/path/to/your/app/repo',
    servers: {
    one: {}
    },
    buildOptions: {
    serverOnly: true,
    },
    env: {
    ROOT_URL: 'http://yourdomain.com',
    MONGO_URL: 'mongodb://username:[email protected]:YOUR_DB_PORT_#/yourappdb',
    PORT: 3000
    },
    docker: {
    image: 'abernix/meteord:base'
    },
    deployCheckWaitTime: 60
    }
    };
    ```
    7. `mup setup`
    8. SSH back in to Droplet with username (not root) and run: `sudo usermod -aG docker $(whoami)`
  7. Sun Lee renamed this gist Jan 8, 2017. 1 changed file with 0 additions and 0 deletions.
  8. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -25,9 +25,10 @@ The following are missing from this instructional (I aim to tackle these next):
    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues that stem from Meteor 1.4 + MUPX + default docker image + node version, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s%&# to work. Said issues are linked below under [References](#references).

    ## Droplet Setup
    1. Login to DigitalOcean and create a droplet
    2. Select Ubuntu 16.04 distribution
    3. Add secret PEM key
    1. `<chainsmoke>`
    2. Login to DigitalOcean and create a droplet
    3. Select Ubuntu 16.04 distribution
    4. Add secret PEM key

    ## Root/User Setup
    1. `ssh [email protected]`
  9. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -182,6 +182,7 @@ server {
    8. SSH back in to Droplet with username (not root) and run: `sudo usermod -aG docker $(whoami)`
    9. `sudo reboot`
    10. Back in MUP directory: `mup deploy`
    11. `</chainsmoke>`

    ## References
    * [Deploying a Meteor app to Digital Ocean](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59)
  10. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ The following are missing from this instructional (I aim to tackle these next):
    * Remote MongoDB
    * Subdomains

    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues with the default docker and node versioning, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s%&# to work. Said issues are linked below under [References](#references).
    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues that stem from Meteor 1.4 + MUPX + default docker image + node version, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s%&# to work. Said issues are linked below under [References](#references).

    ## Droplet Setup
    1. Login to DigitalOcean and create a droplet
  11. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -16,10 +16,11 @@ This is a working instructional to deploy a Meteor 1.4 app with the following (a
    * Meteor 1.4.2.3
    * MUP (not MUPX)

    The following are missing from this instructional:
    The following are missing from this instructional (I aim to tackle these next):

    * SSL setup
    * Remote MongoDB
    * Subdomains

    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues with the default docker and node versioning, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s%&# to work. Said issues are linked below under [References](#references).

  12. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    3. [Root/User Setup](#rootuser-setup)
    4. [Domain Setup](#domain-setup)
    5. [NGINX Setup](#nginx-setup)
    6. [HTTP Authentication (OPTIONAL)][#http-authentication-optional]
    6. [HTTP Authentication (OPTIONAL)](#http-authentication-optional)
    7. [MUP Setup](#mup-setup)
    8. [References](#references)

  13. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,13 @@
    # Deploying A Meteor 1.4 App To DigitalOcean With MUP
    Table of Content
    ## Table of Content
    1. [Introduction](#introduction)
    2. [Droplet Setup](#droplet-setup)
    3. [Root/User Setup](#rootuser-setup)
    4. [Domain Setup](#domain-setup)
    5. [NGINX Setup](#nginx-setup)
    6. [HTTP Authentication (OPTIONAL)][#http-authentication-optional]
    7. [MUP Setup](#mup-setup)
    8. [References](#references)

    ## Introduction
    This is a working instructional to deploy a Meteor 1.4 app with the following (as of January 8th, 2017):
  14. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ The following are missing from this instructional:
    * SSL setup
    * Remote MongoDB

    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues with the default docker and node versioning, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s%&# to work.
    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues with the default docker and node versioning, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s%&# to work. Said issues are linked below under [References](#references).

    ## Droplet Setup
    1. Login to DigitalOcean and create a droplet
  15. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ The following are missing from this instructional:
    * SSL setup
    * Remote MongoDB

    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues with the default docker and node versioning, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s*** to work.
    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues with the default docker and node versioning, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s%&# to work.

    ## Droplet Setup
    1. Login to DigitalOcean and create a droplet
  16. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    Table of Content

    ## Introduction
    This is a working instructional to deploy an app with the following (as of January 8th, 2017):
    This is a working instructional to deploy a Meteor 1.4 app with the following (as of January 8th, 2017):

    * DigitalOcean Ubuntu 16.04
    * Meteor 1.4.2.3
    @@ -13,7 +13,7 @@ The following are missing from this instructional:
    * SSL setup
    * Remote MongoDB

    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion.
    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion. The purpose of a new instructional is to address some recent issues with the default docker and node versioning, and also to make myself feel better for the last 10 hours I spent chainsmoking and getting this s*** to work.

    ## Droplet Setup
    1. Login to DigitalOcean and create a droplet
  17. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ The following are missing from this instructional:
    * SSL setup
    * Remote MongoDB

    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the MUP portion.
    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the NGINX/MUP portion.

    ## Droplet Setup
    1. Login to DigitalOcean and create a droplet
  18. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -176,6 +176,7 @@ server {

    ## References
    * [Deploying a Meteor app to Digital Ocean](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59)
    * [How To Add Swap on Ubuntu 14.04](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04)
    * [How To Set Up HTTP Authentication With Nginx On Ubuntu 12.10](https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10)
    * [Docker can't connect to docker daemon](http://stackoverflow.com/questions/21871479/docker-cant-connect-to-docker-daemon)
    * [mup no longer works with encrypted keys](https://github.com/arunoda/meteor-up/issues/451)
  19. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -179,4 +179,5 @@ server {
    * [How To Set Up HTTP Authentication With Nginx On Ubuntu 12.10](https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10)
    * [Docker can't connect to docker daemon](http://stackoverflow.com/questions/21871479/docker-cant-connect-to-docker-daemon)
    * [mup no longer works with encrypted keys](https://github.com/arunoda/meteor-up/issues/451)
    * [[1.4] mup: errors in production (AssertionError: "undefined" === "function")](https://github.com/meteor/meteor/issues/7475)
    * [[1.4] mup: errors in production (AssertionError: "undefined" === "function")](https://github.com/meteor/meteor/issues/7475)
    * [[meteor 1.4] AssertionError: "undefined" === "function"](https://github.com/arunoda/meteor-up/issues/1091)
  20. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,7 @@
    # Deploying A Meteor 1.4 App To DigitalOcean With MUP
    Table of Content

    ## Introduction
    This is a working instructional to deploy an app with the following (as of January 8th, 2017):

    * DigitalOcean Ubuntu 16.04
    @@ -169,4 +172,11 @@ server {
    7. `mup setup`
    8. SSH back in to Droplet with username (not root) and run: `sudo usermod -aG docker $(whoami)`
    9. `sudo reboot`
    10. Back in MUP directory: `mup deploy`
    10. Back in MUP directory: `mup deploy`

    ## References
    * [Deploying a Meteor app to Digital Ocean](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59)
    * [How To Set Up HTTP Authentication With Nginx On Ubuntu 12.10](https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10)
    * [Docker can't connect to docker daemon](http://stackoverflow.com/questions/21871479/docker-cant-connect-to-docker-daemon)
    * [mup no longer works with encrypted keys](https://github.com/arunoda/meteor-up/issues/451)
    * [[1.4] mup: errors in production (AssertionError: "undefined" === "function")](https://github.com/meteor/meteor/issues/7475)
  21. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -159,12 +159,12 @@ server {
    },
    };
    ```
    There may be an issue with your PEM key if it's passphrase encrypted. Then, do the following:
    ```
    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_rsa
    ```
    ...and then remove the following line from `mup.js`: `// "pem": "~/.ssh/id_rsa"`
    There may be an issue with your PEM key if it's passphrase encrypted. Then, do the following:
    ```
    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_rsa
    ```
    ...and then remove the following line from `mup.js`: `// "pem": "~/.ssh/id_rsa"`

    7. `mup setup`
    8. SSH back in to Droplet with username (not root) and run: `sudo usermod -aG docker $(whoami)`
  22. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 11 additions and 2 deletions.
    13 changes: 11 additions & 2 deletions digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -123,7 +123,7 @@ server {
    one: {
    host: 'yourdomain.com',
    username: 'your_droplet_username'
    // pem: '~/.ssh/id_rsa'
    pem: '~/.ssh/id_rsa'
    // password:
    // or leave blank for authenticate from ssh-agent
    }
    @@ -159,5 +159,14 @@ server {
    },
    };
    ```
    There may be an issue with your PEM key if it's passphrase encrypted. Then, do the following:
    ```
    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_rsa
    ```
    ...and then remove the following line from `mup.js`: `// "pem": "~/.ssh/id_rsa"`

    7. `mup setup`
    8. `mup deploy`
    8. SSH back in to Droplet with username (not root) and run: `sudo usermod -aG docker $(whoami)`
    9. `sudo reboot`
    10. Back in MUP directory: `mup deploy`
  23. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 18 additions and 1 deletion.
    19 changes: 18 additions & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -91,7 +91,24 @@ This is a combination of instructions from multiple articles, but mostly from @j
    12. Test redirect: `curl -I http://www.yourdomain.com`

    ## HTTP Authentication (OPTIONAL)
    Follow [these steps](https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10) exactly if your app is not ready for public viewing and you want username/password login. Step 3 edits should occur in the `/etc/nginx/sites-available/yourapp.com.conf` file from Step 7 under [NGINX Setup](#nginx-setup).
    Follow [these steps](https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10) exactly if your app is not ready for public viewing and you want username/password login. When you get to Step 3, edits should occur in the `/etc/nginx/sites-available/yourapp.com.conf` file from Step 7 under [NGINX Setup](#nginx-setup). See below:
    ```
    server {
    listen 80;
    server_name YOURDOMAIN.com;
    access_log /var/log/nginx/app.dev.access.log;
    error_log /var/log/nginx/app.dev.error.log;
    location / {
    proxy_pass http://XXX.XXX.XX.XXX:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header X-Forwarded-For $remote_addr;
    auth_basic "Restricted"; // <-
    auth_basic_user_file /etc/nginx/.htpasswd; // <-
    }
    }
    ```

    ## MUP Setup
    1. `npm install -g mup`
  24. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -91,7 +91,7 @@ This is a combination of instructions from multiple articles, but mostly from @j
    12. Test redirect: `curl -I http://www.yourdomain.com`

    ## HTTP Authentication (OPTIONAL)
    Follow [these steps](https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10) exactly if your app is not ready for public viewing and you want username/password login. Step 3 edits should occur in the `/etc/nginx/sites-available/yourapp.com.conf` file from Step 7 in #nginx-setup.
    Follow [these steps](https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10) exactly if your app is not ready for public viewing and you want username/password login. Step 3 edits should occur in the `/etc/nginx/sites-available/yourapp.com.conf` file from Step 7 under [NGINX Setup](#nginx-setup).

    ## MUP Setup
    1. `npm install -g mup`
  25. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -91,7 +91,7 @@ This is a combination of instructions from multiple articles, but mostly from @j
    12. Test redirect: `curl -I http://www.yourdomain.com`

    ## HTTP Authentication (OPTIONAL)
    Follow [these steps](https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10) exactly if your app is not ready for public viewing and you want username/password login. Step 3 edits should occur in the `/etc/nginx/sites-available/yourapp.com.conf` file from Step 7 in #NGINX-Setup.
    Follow [these steps](https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10) exactly if your app is not ready for public viewing and you want username/password login. Step 3 edits should occur in the `/etc/nginx/sites-available/yourapp.com.conf` file from Step 7 in #nginx-setup.

    ## MUP Setup
    1. `npm install -g mup`
  26. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -90,6 +90,9 @@ This is a combination of instructions from multiple articles, but mostly from @j
    11. Restart NGINX: `sudo service nginx restart`
    12. Test redirect: `curl -I http://www.yourdomain.com`

    ## HTTP Authentication (OPTIONAL)
    Follow [these steps](https://www.digitalocean.com/community/tutorials/how-to-set-up-http-authentication-with-nginx-on-ubuntu-12-10) exactly if your app is not ready for public viewing and you want username/password login. Step 3 edits should occur in the `/etc/nginx/sites-available/yourapp.com.conf` file from Step 7 in #NGINX-Setup.

    ## MUP Setup
    1. `npm install -g mup`
    2. `mkdir ~/mup-your-project-name` (outside/separate from your actual project repo directory!!!)
  27. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ The following are missing from this instructional:
    * SSL setup
    * Remote MongoDB

    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59).
    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59) with a few edits to the MUP portion.

    ## Droplet Setup
    1. Login to DigitalOcean and create a droplet
  28. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -54,6 +54,7 @@ This is a combination of instructions from multiple articles, but mostly from @j
    3. Install NGINX: `sudo apt-get install nginx`
    4. `sudo nano /etc/nginx/sites-available/default`
    5. Add the following and save:

    ```
    # redirect www to non-www
    server {
    @@ -63,8 +64,10 @@ This is a combination of instructions from multiple articles, but mostly from @j
    return 301 $scheme://yourdomain.com$request_uri;
    }
    ```

    6. `sudo nano /etc/nginx/sites-available/yourappname.com.conf`
    7. Add the following and save:

    ```
    server {
    listen 80;
    @@ -80,6 +83,7 @@ This is a combination of instructions from multiple articles, but mostly from @j
    }
    }
    ```

    8. Link the config file to `sites-enabled`: `sudo ln -s /etc/nginx/sites-available/yourappname.com.conf /etc/nginx/sites-enabled/yourappname.com.conf`
    9. Hide NGINX number: `sudo nano /etc/nginx/nginx.conf`
    10. Uncomment `server_tokens off;`
  29. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 63 additions and 63 deletions.
    126 changes: 63 additions & 63 deletions digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -54,32 +54,32 @@ This is a combination of instructions from multiple articles, but mostly from @j
    3. Install NGINX: `sudo apt-get install nginx`
    4. `sudo nano /etc/nginx/sites-available/default`
    5. Add the following and save:
    ```
    # redirect www to non-www
    server {
    listen 80;
    # to redirect all subdomains use *.yourdomain.com instead of www.yourdomain.com
    server_name www.yourdomain.com;
    return 301 $scheme://yourdomain.com$request_uri;
    }
    ```
    ```
    # redirect www to non-www
    server {
    listen 80;
    # to redirect all subdomains use *.yourdomain.com instead of www.yourdomain.com
    server_name www.yourdomain.com;
    return 301 $scheme://yourdomain.com$request_uri;
    }
    ```
    6. `sudo nano /etc/nginx/sites-available/yourappname.com.conf`
    7. Add the following and save:
    ```
    server {
    listen 80;
    server_name YOURDOMAIN.com;
    access_log /var/log/nginx/app.dev.access.log;
    error_log /var/log/nginx/app.dev.error.log;
    location / {
    proxy_pass http://XXX.XXX.XX.XXX:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header X-Forwarded-For $remote_addr;
    }
    }
    ```
    ```
    server {
    listen 80;
    server_name YOURDOMAIN.com;
    access_log /var/log/nginx/app.dev.access.log;
    error_log /var/log/nginx/app.dev.error.log;
    location / {
    proxy_pass http://XXX.XXX.XX.XXX:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header X-Forwarded-For $remote_addr;
    }
    }
    ```
    8. Link the config file to `sites-enabled`: `sudo ln -s /etc/nginx/sites-available/yourappname.com.conf /etc/nginx/sites-enabled/yourappname.com.conf`
    9. Hide NGINX number: `sudo nano /etc/nginx/nginx.conf`
    10. Uncomment `server_tokens off;`
    @@ -93,47 +93,47 @@ server {
    4. `mup init`
    5. Copy your project's `settings.json` into MUP `settings.json`
    6. Make following edit to your `mup.js` file
    ```
    module.exports = {
    servers: {
    one: {
    host: 'yourdomain.com',
    username: 'your_droplet_username'
    // pem: '~/.ssh/id_rsa'
    // password:
    // or leave blank for authenticate from ssh-agent
    }
    },
    ```
    module.exports = {
    servers: {
    one: {
    host: 'yourdomain.com',
    username: 'your_droplet_username'
    // pem: '~/.ssh/id_rsa'
    // password:
    // or leave blank for authenticate from ssh-agent
    }
    },
    meteor: {
    name: 'yourappnamewithoutspaces',
    path: '/local/path/to/your/app/repo',
    servers: {
    one: {}
    },
    buildOptions: {
    serverOnly: true,
    },
    env: {
    ROOT_URL: 'http://yourdomain.com',
    MONGO_URL: 'mongodb://localhost/meteor',
    PORT: 3000
    },
    meteor: {
    name: 'yourappnamewithoutspaces',
    path: '/local/path/to/your/app/repo',
    servers: {
    one: {}
    },
    buildOptions: {
    serverOnly: true,
    },
    env: {
    ROOT_URL: 'http://yourdomain.com',
    MONGO_URL: 'mongodb://localhost/meteor',
    PORT: 3000
    },
    docker: {
    image: 'abernix/meteord:base' // <- THIS IS IMPORTANT
    },
    deployCheckWaitTime: 60
    },
    docker: {
    image: 'abernix/meteord:base' // <- THIS IS IMPORTANT
    },
    deployCheckWaitTime: 60
    },
    mongo: {
    oplog: true,
    port: 27017,
    servers: {
    one: {},
    },
    },
    };
    ```
    mongo: {
    oplog: true,
    port: 27017,
    servers: {
    one: {},
    },
    },
    };
    ```
    7. `mup setup`
    8. `mup deploy`
  30. Sun Lee revised this gist Jan 8, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion digitalocean-mup-meteor-1.4.2.3.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Deploying A Meteor 1.4 App To DigitalOcean With Mup
    # Deploying A Meteor 1.4 App To DigitalOcean With MUP
    This is a working instructional to deploy an app with the following (as of January 8th, 2017):

    * DigitalOcean Ubuntu 16.04
    @@ -10,6 +10,8 @@ The following are missing from this instructional:
    * SSL setup
    * Remote MongoDB

    This is a combination of instructions from multiple articles, but mostly from @jamiewilson's [amazing gist tutorial](https://gist.github.com/jamiewilson/4e1d28f9a200cb34ad59).

    ## Droplet Setup
    1. Login to DigitalOcean and create a droplet
    2. Select Ubuntu 16.04 distribution