Welcome to this new edition of One Framework a Day keeps the Boredom Away. In this series I will show you how to deploy a particular framework on Clever Cloud every day until I want to go back to boredom. Today it's about Meteor.
In each post of this series we'll see how to deploy a particular framework on Clever Cloud. Today we are taking a look at Meteor.
If you want to tag along, make sure you have git, a Clever Cloud account and that you have installed our CLI Clever-Tools.
What is Meteor?
Meteor is an open source platform for web, mobile, and desktop.
It's also a JavaScript based, cross device stack that uses MongoDB for persistence. They have a great ecosystem with many modules. Search for Meteor on Github and you will get lots and lots of results. I sorted them out by date and it's impressive how active that ecosystem is. One of the most stared project is a Trello clone called Wekan. This is what we are going to deploy today.
Setup
Here are the steps to create and deploy a Wekan application to Clever Cloud:
- Clone the project:
git clone https://github.com/wekan/wekan
- Get in the project:
cd wekan
- Create the Meteor application:
clever create --type meteor wekan
- Create the MongoDB addon:
clever addon create mongodb-addon --plan peanut wekanDB
- Link the database to the application:
clever service link-addon wekanDB
- Add your domain:
clever domain add wekan.cleverapps.io
- Configure the MongoDB connection:
clever env set MONGODB_URI `clever env | awk -F = '/MONGODB_ADDON_URI/ { print $2}'`
- Set the root URL of your website:
clever env set ROOT_URL https://wekan.cleverapps.io
By default Clever Cloud uses node 8 to build your project but this won't work with Wekan, I am using node 6. To do that you need to edit package.json
and add the following content:
"engines": {
"node": "^6"
}
With that you are ready for a baisc Wekan configuration. You can also setup an email SMTP server if you have one:
clever env set MAIL_URL smtp://user:pass@mailserver.example.com:25/
clever env set MAIL_FROM wekan-admin@example.com
Deploy
To deploy the application first go on Clever Cloud's WebConsole, select your application, select the information tab and tick the Enable dedicated build instance checkbox.
Now run clever deploy
and your build should start. Meteor builds can be long, be patient. In 10 minutes you will have your Wekan instance in production 🙂
If you like Meteor, VulcanJS is an interesting project and can be deployed with the exact same process. I invite you to test other Meteor applications and let us know how it worked!