Using gitpod.io for your Meteor project

Over four years ago the beloved MeteorPad application was teared down. It provided an online IDE to work on a Meteor project, perfect for trials and demos. With a few simple steps you can recreate this facility for your own projects.

Franz Knipp
2 min readJul 30, 2020

To start, you need a project hosted on Github, Gitlab or Bitbucket, as Gitpod provides integrations with these providers. You can even start with a foreign project like my almost empty test project.

To add the capability to your project, you’ve to add two files:

.gitpod.yml

This file configures the behaviour of Gitpod regarding your project.

image:
file: .gitpod.Dockerfile

tasks:
- before: export ROOT_URL=$(gp url 3000)
init: meteor npm install
command: meteor
ports:
- port: 3000
onOpen: open-preview
- port: 3001 # mongo db
onOpen: ignore

The first part defines the Dockerfile to use which we’ll see later.

The follows the description how to start Meteor.

The last part declares the handling of the ports used by Meteor.

.gitpod.Dockerfile

The second file is even shorter and installs Meteor into the container.

FROM gitpod/workspace-full

USER gitpod
RUN cd /home/gitpod && curl https://install.meteor.com/ | sh

Let’s start to code — online!

To open your project in the browser, just append the URL to the repository to https://gitpod.io/#, e. g. https://gitpod.io/#https://github.com/fknipp/meteor-default

Thanks to Sven Efftinge for providing this recipe as pull request for a Meteor project!

--

--

Franz Knipp

Program Director for Software Engineering at UAS Burgenland (Austria) — Software Developer, Founder and CEO of http://qnipp.com