@veho-tech/deploy-meteor
v1.0.5
Published
small Node app for (re)configuring a Meteor deployment with pm2
Readme
deploy-meteor
This is a simple command line Node app that helps you deploy/update a Meteor application.
Prerequisites
You need to install pm2 globally and have the server tarball,
that meteor build creates, extracted already.
Also, we assume that you have your Meteor settings stored inside your Meteor app's assets. (You might want to check out git-crypt if you have sensitive information in your settings file.)
Installation
npm i -g @veho-tech/deploy-meteorUsage
Assuming you have the following setup:
extracted server tarball in
/home/my-fancy-app/bundlean existing/prefilled pm2 config file in
/home/my-fancy-app/pm2-config.jsonwith a content looking like this:{ "name": "my-fancy-app", "env": { "PORT": 3000, "HTTP_FORWARDED_COUNT": 1, "MONGO_URL": "mongodb://localhost:27017/my_fancy_app?replicaSet=rs0", "MONGO_OPLOG_URL": "mongodb://localhost:27017/local?replicaSet=rs0&authSource=my_fancy_app", "ROOT_URL": "https://my-fancy-app.com", "MAIL_URL": "smtp://bot%40my-fancy-app.com:[email protected]:587" } }your settings file is located inside your Meteor project at
private/settings.json{ "AWSAccessKeyId": "test", "AWSSecretAccessKey": "test", "AWSBucket": "test", "AWSRegion": "test" }
If you then run
npm i -g @veho-tech/deploy-meteor
deploy-meteor --config=/home/my-fancy-app/pm2-config.json --settings=settings.json /home/my-fancy-app/bundleyour config file /home/my-fancy-app/pm2-config.json will be updated like this:
{
"name": "my-fancy-app",
"cwd": "/home/my-fancy-app/bundle",
"script": "main.js",
"env": {
"PORT": 3000,
"HTTP_FORWARDED_COUNT": 1,
"MONGO_URL": "mongodb://localhost:27017/my_fancy_app?replicaSet=rs0",
"MONGO_OPLOG_URL": "mongodb://localhost:27017/local?replicaSet=rs0&authSource=my_fancy_app",
"ROOT_URL": "https://my-fancy-app.com",
"MAIL_URL": "smtp://bot%40my-fancy-app.com:[email protected]:587",
"METEOR_SETTINGS": "{\"AWSAccessKeyId\":\"test\",\"AWSSecretAccessKey\":\"test\",\"AWSBucket\":\"test\",\"AWSRegion\":\"test\"}"
}
}Options
- `--
License
MIT
