Last active
June 3, 2019 11:18
-
-
Save krishamoud/4e9d7344ccfe16d9aa6e to your computer and use it in GitHub Desktop.
Deploy Meteor onto Elastic Beanstalk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
option_settings: | |
- option_name: AWS_SECRET_KEY | |
value: ------------------------------------------- | |
- option_name: AWS_ACCESS_KEY_ID | |
value: ------------------------------ | |
- option_name: PORT | |
value: 8081 | |
- option_name: MONGO_URL | |
value: mongodb://user:password@endpoint:27017/db | |
- namespace: aws:elasticbeanstalk:container:nodejs | |
option_name: ProxyServer | |
value: nginx | |
- namespace: aws:elasticbeanstalk:container:nodejs:staticfiles | |
option_name: /public | |
value: /public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bundling commands: | |
meteor bundle bundle.tgz | |
mv bundle.tgz .. | |
cd .. | |
tar -zxvf bundle.tgz | |
sudo cp -a bundle/. ../<project_name>-production/bundle/ | |
cd bundle | |
rm -rf programs/server/node_modules/fibers/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "appName", | |
"version": "0.0.1", | |
"scripts": { | |
"start": "node main.js" | |
}, | |
"dependencies": { | |
"fibers": "1.0.1", | |
"forever": "*" | |
} | |
} |
@justindra i found a google group here: https://groups.google.com/forum/#!topic/meteor-talk/VxMQzpVFpME they talk about the websocket setup. and there is also a stackoverflow tip for the nginx config that can serve the websocket here:
http://stackoverflow.com/questions/27084124/how-do-i-customize-nginx-on-aws-elastic-beanstalk-to-loadbalance-meteor/27308730#27308730
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've gotten it to work Meteor 1.3. Sort of... It all deploys no problem at all. The trick for me was to run
npm install
inside ofbundle/programs/server
folder then removebcrypt
andfibers
from node_modules.Although there are problems with using Meteor.settings, as EBS doesn't allow JSON to be used for the env variables.
The other problem I'm having is none of my subscriptions are working as WebSockets seem to be blocked. I keep receiving the error below.
@JacquesRobin I developed this on Windows and ran it on Linux on AWS EBS.