Meteor 1.8.1 Deployment on Elastic Beanstalk

@rjdavid, This time error solved using meteor npm install command, but when I deployed the build on Elastic Beanstalk then the URL returns nothing it keeps loading.

Getting meteor to work on EBS is pretty tricky. Is there a recent guide youā€™re following? Are you sure you even need EBS? MUP on a powerful instance is going to perform better than EBS and be cheaper.

There are lots of subtle issues, like the websocket timeout and stickiness on their application load balancer. Itā€™s really not worth the headache and it obscures a lot of whatā€™s actually going on.

The only problem with mup is while new deployment the site is down. Otherwise its a great tool for deployment.

I donā€™t know any of issues with Elastic Beanstalk because I never experienced that thing, Thanks for sharing this fact.

Also, it seems like mup is the only available option for deployment.

@doctorpangloss, Just curious to know this, If I create a Meteor build then it created pure node js based project, what use that project for deployment on Server. As the same procedure is used by Elastic Beanstalk, Does it make any difference or its just the same?

You should check out this plugin for MUP created by zodern. We havenā€™t used it ourselves but I think lots of people here do. That will give you zero downtime deploys.

@mixmatric you can disable this behavior by setting stopAppDuringPrepareBundle to false in your mup config file.
Make sure your server has enough memory to support running both apps during switch phase

Thanks @tunifight, Will give it a try!!

Thanks @marklynch, I will definitely try this

I am using Meteor 1.8.1 and want to deploy my app on Elastic Beanstalk, I have done it earlier so I know the process

Hi! Im trying to do this now, can you please share the process that you followed?

Thanks

1 Like

Any followups on this?

I believe, you should have same node js version to avoid conflicts.

Procedure is straightforward but make sure it works fine on your local

  1. create a build
  2. Unzip it
  3. cd bundle & cd program & cd server & npm install
  4. Go back to bundle & node main.js

Also, you need to configure mongo url but also if thatā€™s not done, you will have friendly errors that you can solve easily.

If you get it right on local, it would also work in the elastic beanstalk also.

If there are any errors, then pls share

1 Like

Thatā€™s pretty much the procedure Iā€™ve been trying. Iā€™ve had some success with just one of the Meteor Example apps, but not our own app yet (running on v1.8.1).

This is because the oldest Node version EB supports is 10 (as opposed to 8 which is what 1.8.1 is on).

I tried updating my app to v1.9 but keep running into issues regarding fourseven:scss package (this is even locally)

I tried using my 1.8.1 app with Node 10 to see if it works, but keep getting errors about not finding fibers on EB.

Iā€™m gonna try several more things soon and get back to you ASAP.

Thanks!

I got my app updated to v1.9 by locking down fourseven to v 4.12.0. I then got the app built and deployed to EB on Node 12.

Iā€™ve confirmed Iā€™m able to launch the app locally.

However, on EB, I get a connection timeout. Iā€™m thinking this is due to the reverse proxy and PORT.

I tried removing the reverse proxy and using port 3000,80,8080,8081, and 443 all to no avail. Any ideas? Thanks

I mentioned port in the start script itself, along with Port as the environmental variable.

Something similar to

export PORT=80 && export MONGO_URL=ā€˜YOUR MONGODB URLā€™ && node main.js

You are just uploading a zip file in ebs, not sure from where you are configuring the reverse proxy.

I got it to work. My issue was with the force-ssl plugin. The app was redirecting http to https and this caused issues.

Iā€™d been adding PORT as an ENV var in Beanstalk Settings. However, app seems to work without that. README listens on 80 by default and so that does it. Adding ENV var is supposed to override it

1 Like