Step by step guide to deploy your Meteor.js app by uploading your project build from the dashboard

  • 1
    Deploy your cluster

    Log in and navigate to the Dashboard. Click on deployments and complete the form. You will be required to select the size of your container and the region where your cluster is to be hosted.

    Once the cluster is provisioned, a URL will be assigned to your project which will be displaced on the dashboard.

  • 2
    Prepare your app for deployment
    meteor build <folder_name> --architecture os.linux.x86_64

    Remarks

    From the command prompt (windows) or terminal (linux, mac) build your app using meteor build for os.linux.x86_64.

    If you intend to use the --server flag which requires the <host>:<port> value, you can retrieve this value from the dashboard after you deploy your cluster in Step 1 by clicking on Deployments → Deployed Apps → Cluster Actions → Deploy app. If the assigned endpoint to your app is "https://simple-todos-1.nodechef.com", the host address of your app is then "simple-todos-1.nodechef.com" and the port is 80.
  • 3
    Upload your project build

    After building your project from Step 2. You will will be able to upload the output of your project build to your App containers. You can always find the form to upload your project from the dashboard by navigating to Deployments → Deployed Apps → Cluster Actions → Deploy app

    From the upload form, under App code, select the output tar.gz file that was generated from the build.

    In case you wish to deploy your app with meteor settings. You can select your meteor settings file from the upload form. If using a remote database (That is, a database not hosted by NodeChef), you must set the MONGO_URL and the MONGO_OPLOG_URL (optional) in your meteor settings file.

    The tar.gz archive generated from the meteor build cannot exceed 256 megabytes in size.

    Upload your node.js project

    Once you click the Deploy app button, you should be able to see the status of the deployment from the progress indicator which is displayed right below the Upload form.

    Upload your node.js project status


Base container image

The NodeChef base image runs Ubuntu 14.04 and comes with the below listed set of packages pre-installed.

node.js (Version depends on the Meteor.js version deployed) build-essential wget putty-tools curl rsync phantomjs ca-certificates imagemagick graphicsmagick libcairo2-dev poppler-utils libjpeg-dev wkhtmltopdf libssl-dev xfonts-base xfonts-75dpi libpoppler-qt4-dev


Startup script

In some cases you might want to install additional ubuntu packages other than the ones listed above. To do so, Navigate to the Task manager on the dashboard and click on App actions → Startup bash script. Write the bash script intended to run on Ubuntu which will install the package and use the save script button to trigger this update.